JoystickGremlin icon indicating copy to clipboard operation
JoystickGremlin copied to clipboard

IntegerVariable and FloatVariable have surprising defaults

Open henniss opened this issue 3 years ago • 1 comments

IntegerVariable and FloatVariable have surprising defaults limits of [0, 10] and [-1, 1], respectively. I suggest not restricting these by default. If a plugin author has particular limits in mind, they can set them -- otherwise why not let the user choose freely?

henniss avatar Mar 04 '21 04:03 henniss

The defaults were picked with specific intents. The float one being -1, 1 lines up with the main use which is axis values which are in this range. The integer one is a bit more arbitrary. However, replacing it with something removing the constraints is not going to happen, das say infinity is never a valid value in Gremlin and as such allowing, by default, the ability to use invalid values is bad. The only other sensible option is to not have any defaults and force them to be specified in every situation.

WhiteMagic avatar Mar 08 '21 12:03 WhiteMagic