[x3d-public] Interesting max/round off issue

John Carlson yottzumm at gmail.com
Sun Mar 1 20:17:35 PST 2026


I will follow whatever X3DUOM does.  I am also concerned about any physical
tolerances in the case of simulation of real life.  If X3D passes a value,
and in real life, it causes serious malfunction, that might not be good.
That’s why I prefer a filter that constrains or adjusts back to max or
min.  I believe schema should still catch the problem.

Thanks,


John

On Sun, Mar 1, 2026 at 12:02 PM Don Brutzman via x3d-public <
x3d-public at web3d.org> wrote:

> Thank you for suggestion that we might change boundary values for our
> numerical validation limits.
>
> I would be reluctant to change limit for pi/2 to “2” , since that could be
> a mistaken model entry for 2 degrees, which is a case that does need to be
> caught as a validation error.
>
> I think a limit of 1.6 would be OK, that would be forgiving of roundoff
> errors and permit functional content, also providing a hint for numerical
> value of pi over two.
>
> Similarly, we might make the validation limit for pi as 3.2.
>
> Meanwhile, we should probably keep specification boundaries unchanged
> since they are reasonably precise and correct.  Most are defined in terms
> of pi, double checking for consistency is always a good idea.
>
> Dick and I can discuss his topic at the next specification editors meeting.
>
> all the best, Don
>
> --
> X3D Graphics, Maritime Robotics, Distributed Simulation
> Relative Motion Consulting  https://RelativeMotion.info
>
>
> On Sun, Mar 1, 2026 at 04:46 Vincent Marchetti via x3d-public <
> x3d-public at web3d.org> wrote:
>
>> I think this serves as an example of overeager validation, not overeager
>> rounding.
>>
>> If validation is going to be a useful tool it should serve to warn of
>> practical errors. The issue raised here could happen regardless of any
>> additional rounding applied beyond that due to floating point
>> representation.
>>
>> I suggest that a practical validation for this case would be to compare
>> the groundAngle to 2.0 This will allow users to achieve the intentian of a
>> groundAngle of pi/2 without giving false validation errors, and it would
>> raise a red flag if the author mistakenly entered 180 for the groundAngle.
>>
>> It's always the code developer responsibility to catch mathematically
>> invalid input values at run time.
>>
>> Vince Marchetti
>>
>>
>> > On Mar 1, 2026, at 3:39 AM, John Carlson via x3d-public <
>> x3d-public at web3d.org> wrote:
>> >
>> > Any comments on overeager rounding, which causes validation failures?
>>  Maximum angle is 1.5708, which rounds off to 1.571, which is too big.
>> Problem is with Background.groundAngle.  An argument for always validating?
>> >
>> > I didn’t notice an issue visually until trying to interpret schema
>> validation issues.
>> >
>> > Any JavaScript filters for fixing overflows is welcome!
>> >
>> > As Joe says, sometimes you just want to go into user code and fix it.
>> >
>> > What if this had happened with .glb?
>> >
>> > John
>> >
>> >
>> > Error below:
>> > keyword: maximum
>> > schema location: $defs > Background > oneOf > 1 > properties >
>> @groundAngle > items > maximum
>> > schema value: 1.5708
>> > instance location: X3D > Scene > -children > 0 > Background >
>> @groundAngle > 1
>> > instance value: 1.571
>> > instance shorthand value: 1.571
>> > _______________________________________________
>> > x3d-public mailing list
>> > x3d-public at web3d.org
>> > http://web3d.org/mailman/listinfo/x3d-public_web3d.org
>>
>>
>> _______________________________________________
>> x3d-public mailing list
>> x3d-public at web3d.org
>> http://web3d.org/mailman/listinfo/x3d-public_web3d.org
>>
> _______________________________________________
> x3d-public mailing list
> x3d-public at web3d.org
> http://web3d.org/mailman/listinfo/x3d-public_web3d.org
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://web3d.org/pipermail/x3d-public_web3d.org/attachments/20260301/10f6c3ea/attachment.html>


More information about the x3d-public mailing list