- Move Build vector angle functions from binaryangle.h to gamefuncs.h.

This commit is contained in:
Mitchell Richters 2022-08-28 12:45:48 +10:00 committed by Christoph Oelckers
parent 7c7351db8d
commit 1a0b8aff69
2 changed files with 22 additions and 22 deletions

View file

@ -183,28 +183,6 @@ inline FSerializer &Serialize(FSerializer &arc, const char *key, fixedhoriz &obj
} }
//---------------------------------------------------------------------------
//
// High precision vector angle function, mainly for the renderer.
//
//---------------------------------------------------------------------------
inline int getangle(double xvect, double yvect)
{
return DVector2(xvect, yvect).Angle().Buildang();
}
inline int getangle(const DVector2& vec)
{
return getangle(vec.X, vec.Y);
}
inline int getangle(const vec2_t& vec)
{
return getangle(vec.X, vec.Y);
}
//--------------------------------------------------------------------------- //---------------------------------------------------------------------------
// //
// Interpolation functions for use throughout games. // Interpolation functions for use throughout games.

View file

@ -218,6 +218,28 @@ inline double bcosf(const double ang, const int shift = 0)
} }
//---------------------------------------------------------------------------
//
// High precision vector angle function, mainly for the renderer.
//
//---------------------------------------------------------------------------
inline int getangle(double xvect, double yvect)
{
return DVector2(xvect, yvect).Angle().Buildang();
}
inline int getangle(const DVector2& vec)
{
return getangle(vec.X, vec.Y);
}
inline int getangle(const vec2_t& vec)
{
return getangle(vec.X, vec.Y);
}
extern int cameradist, cameraclock; extern int cameradist, cameraclock;
void loaddefinitionsfile(const char* fn, bool cumulative = false, bool maingrp = false); void loaddefinitionsfile(const char* fn, bool cumulative = false, bool maingrp = false);