On Thu, Apr 20, 2017 at 04:08:21PM +0200, Michael Bax wrote:
> > 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

Yes, so too is (1.57079637f == 1.5707964f), on gcc 4.8.4 x86_64.

> > 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

Almost like.  As author of to_dir, naming loss is felt, apparently
some attachment still ... and the constant 40.743665f is a bit opaque.

Otherwise grand.  ;-)

-- 
James Cameron
http://quozl.netrek.org/