[x3d-public] Using c# with graphics

John Carlson yottzumm at gmail.com
Mon Sep 20 22:59:09 PDT 2021


The way decimal numbers are handled X3D is with SF/MFFloat and 
SF/MFDouble.  What gets tricky is when you get up to a level of scale 
where that accuracy is no longer useful, then one goes into LOD (Level 
of Detail).

I hope this helps.

Accuracy costs you in performance.  Most scientific experiments don't 
have that number of significant digits.   The good thing is, computer 
store numbers such that the significant digits is maintained.  It might 
be worth googling "How are decimal numbers stored on a computer?"  I do 
not know what C# does with numbers. I speak in low level, computer 
hardware numbers that fit in 64-bits.   Words too look up are mantissa 
and exponent.

This appears to be a good link: 
https://en.wikipedia.org/wiki/Scientific_notation

Thanks!

John

On 9/21/21 12:04 AM, Konstantin Smirnov wrote:
> Hi
> When adding double numbers in .cs script, must we think about every 
> digit accuracy, or it's approximate numbers, so we can treat them as 
> approximate with e-7, or so? 15?
>
> Can we do calc and round afterwards?
>
> _______________________________________________
> 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/20210921/82350ef7/attachment.html>


More information about the x3d-public mailing list