XorDev / GML_Shaders

GML functions brought to GLSL
10 stars 1 forks source link

Module-local variable `seed` blocks commonly used variable name #4

Closed Sigmarik closed 1 year ago

Sigmarik commented 1 year ago

There is a strict taboo on the word seed used as a function, variable or structure name in any project that uses this module.

That's because the name seed is already used in your module as a global variable. On top of that, there is no indication that the float variable seed is crucial for your random system and, therefore, should not be modifiable by the user of this library. Many C libraries that do use such variable tend to name them accordingly, all-caps with leading underlines (as opposed to snake case used for local variables).