On Friday 31 Dec 2004 16:01, Christian Mayer wrote:
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
>
> Dave Martin schrieb:
> | Any clues as to why, when I try to display the output
> | of /instrumentation/comm/frequencies/selected-mhz etc on my Comm
>
> radio, The
>
> | output gets rounded down or reduced by 0.01 in some cases but not others.
> |
> | ie: set 120.5 displayed 120.49
> |
> | set 120.8 displayed 120.8
>
> Floating point rounding error? (There are many "simple" numbers that we
> use, that floating point numbers can't represent. E.g. 0.01)
>
> If the floating point number gets cut off and not rounded you'll also
> might get that effect.
>
> Could you try to add 0.005 before rounding/cut off and see if that helps?

Not sure if I follow (I am no coder - just a modeller ;-) )

I'm not trying to round the output - it appears that FG is doing that and I 
need to prevent it to get a correct output on the display.

ie: if /instumentation/comm/frequencies/selected-mhz reports 120.5 in the 
properties browser, it is actually displaying 120.49

Sorry if I'm not making much sense :-/

Dave Martin

_______________________________________________
Flightgear-devel mailing list
[email protected]
http://mail.flightgear.org/mailman/listinfo/flightgear-devel
2f585eeea02e2c79d7b1d8c4963bae2d

Reply via email to