Le 12.02.2010 14:21, kur...@free.fr a écrit : > Matthieu Fertré <matthieu.fer...@free.fr> a écrit : > >> Unfortunately, it does not build, because it lacks function for atan and >> acos, and I'm definitely unable to write such functions ;) >> > asin(b) = pi - acos(b), hoping they provide the float subtraction operator. > However, at first sight, I have no idea for atan. > > Depends on the usage of the return of atan... However, grepping in the code, > I can only see one usage for acos and that's all. So, where are the uses of > asin and/or atan located? >
$ git grep acos lib/wormux/include/WORMUX_vector2.h: return acos( cosA ); src/graphic/sprite.cpp: rhs_angle = -acos(-old_hotspot_delta.x / rhs_dst); $ git grep asin src/weapon/explosion.cpp: int dx = (int) (cos(asin((float)y / config.explosion_range)) * (float) y); $ git grep atan lib/wormux/include/WORMUX_vector2.h: double angle = atan(double(y)/double(x)); src/map/ground.cpp: /* double tangeante = atan((double)(p2.y-p1.y)/(double)(p2.x-p1.x)); src/map/ground.cpp: //calculated with a good old TI-83... using table[a][b] = atan( (a-2) / (b-2) ) Thus, the first thing to make compile with the patches is probably WORMUX_vector2.h Regards, Matt (gentildemon) _______________________________________________ Wormux-dev mailing list Wormux-dev@gna.org https://mail.gna.org/listinfo/wormux-dev