On Friday 10 May 2013 09:11:32 light86 wrote:
> hi every body
> this my code
> y=p2dProxy.GetYaw (); the value of y is 1.570796x
> when i test the value of y(
> if y=1.570796x printf ("sucess");
> it don't work please help me
> Thank you
This is not a player issue but a programming one. You need to look at how
numbers are represented and the fact that they are (almost) always
approximations (for example, a computer, using "normal" math libraries cannot
In your case it is likely that the value in fact needs many more digits to get
its actual value (unless otherwise specified, displaying a float only displays
a few of the digits).
Testing for equality is rarely the correct thing to do as equality is rather
unusual when one talks about robotics.