Closed pixelzoom closed 3 months ago
@arouinfar Thoughts on what to display for small negative values?
@pixelzoom instead of displaying "< 0.01" we could display "~ 0.00" for any value with an absolute value < 0.01. We do this in Collision Lab for small, non-zero values. When using the about "~" notation, the sign becomes irrelevant.
I asked a today's dev meeting, and developer's felt that the "~" notation was appropriate here.
For my first attempt, "~0.00" looks too much like a negative sign:
Adding a space looks like it would be less likely to be confused with a negative sign, but I don't know how "~" is typically used:
@arouinfar Let's discuss.
Discussed with @arouinfar.
We'll go with "~ 0 G" for B, Bx, By -- see screenshot below.
We decided NOT to do the same for theta.
Test drive in main or 1.0.0-dev.20.
Over to @arouinfar for review, close if OK.
Looks good, thanks @pixelzoom! Closing.
Specifically it's not doing the correct thing for negative small non-zero gauss values. Here's the offending code in FieldMeterNode, where this gets skipped if
gauss
is negative:Fixing this is straightforward, by using
Math.abs( gauss )
.But then there's a new problem -- what should be displayed if (for example)
gauss
is-0.001
? Displaying "< 0.01" does not seem correct, because it implies a positive value.Note that this is a problem for Bx and By, which are signed. B (magnitude) is unsigned.