[ODE] M_PI problem

amundbørsand amund at c2i.net
Sun Apr 20 13:58:01 2003


"Koby Zalmanson" <zkoby@inter.net.il> skreiv:

> When I tried to use M_PI in some of the calculations of an angle the
> calculation was  0 for example: 35/180*M_PI
> do you know why?

Yes, C assumes you want an integer division. Try typing 35./180.*M_PI to
force it to use floats.

-- 
amundbørsand <amund@c2i.net>