NormalisableRange breaks down with *very* small intervals

NormalisableRange<float>(0.0f, 1.0f, 1e-38f) works fine, but NormalisableRange<float>(0.0f, 1.0f, 1e-39f) does not, above ~0.33f the normalise function is snapping the value to 1.0f. I haven’t gone into to it any further, but I strongly suspect this is a limitation that cannot be remedied, so an addition to the documentation (or an assert) about said limitation would be useful.

That’s going to be difficult to guard against. Probably the best we can do is add something to the docs.

1 Like

Isn’t 1e-39f beyond the floating point limit?

According to when trying float c = 1e-46f;

magnitude of floating-point constant too small for type ‘float’; minimum is 1.40129846E-45

but your link says ~1.2e-38f is the smallest.

Quot capita, tot sententiae

Does that apply to mathematics? I don’t mean theory.:grinning: