> Those constants aren't accurate to the limit of a float. E.g., > (float)M_PI/2.0 == 1.57079637f but (float)M_PI/2.0 != 1.5707964f. printf( "%i\n", (float) ( M_PI/2.0 ) == 1.5707964f ); 1 > The argument to atan2 are supposed to by y,x, not x,y, assuming one > wants the normal trigonometric convention. But I recall the sin/cos > tables in netrek are different, and they're what defines the truth > about how to interpret an angle. Units aside, sin is sin. But the direction of "0" is chosen by the implementation. > In a less fractured code base, there should have been some utility to > do this so it wouldn't keep getting re-implemented. Funny that you should mention that… :-) https://github.com/mrbax/netrek-server/commit/5bcf5964eef8c545c3dda43a16b28ffc60fcd7b0 Cheers Michael