mirror of
https://github.com/DrBeef/Raze.git
synced 2025-02-21 03:01:36 +00:00
- clean out the unused sintable stuff
This commit is contained in:
parent
88dcc37e94
commit
e83d0930bf
1 changed files with 4 additions and 20 deletions
|
@ -207,48 +207,32 @@ enum
|
|||
{
|
||||
BAMBITS = 21,
|
||||
BAMUNIT = 1 << BAMBITS,
|
||||
SINTABLEBITS = 30,
|
||||
SINTABLEUNIT = 1 << SINTABLEBITS,
|
||||
BUILDSINBITS = 14,
|
||||
};
|
||||
|
||||
constexpr double BAngRadian = pi::pi() * (1. / 1024.);
|
||||
constexpr double BAngToDegree = 360. / 2048.;
|
||||
constexpr DAngle DAngleBuildToDeg = DAngle::fromDeg(BAngToDegree);
|
||||
|
||||
inline constexpr double sinscale(const int shift)
|
||||
{
|
||||
return shift >= -BUILDSINBITS ? uint64_t(1) << (BUILDSINBITS + shift) : 1. / (uint64_t(1) << abs(BUILDSINBITS + shift));
|
||||
}
|
||||
|
||||
|
||||
//---------------------------------------------------------------------------
|
||||
//
|
||||
// Build sine inline functions.
|
||||
//
|
||||
//---------------------------------------------------------------------------
|
||||
|
||||
inline int bsin(const int ang, int shift = 0)
|
||||
inline int bsin(const int ang)
|
||||
{
|
||||
return int(g_sinbam(ang * BAMUNIT) * sinscale(shift));
|
||||
return int(g_sinbam(ang * BAMUNIT) * 16384);
|
||||
}
|
||||
|
||||
//---------------------------------------------------------------------------
|
||||
//
|
||||
// Build cosine inline functions.
|
||||
//
|
||||
// About shifts:
|
||||
// -6 -> * 16
|
||||
// -7 -> * 8
|
||||
// -8 -> * 4
|
||||
// -9 -> * 2
|
||||
// -10 -> * 1
|
||||
//
|
||||
//---------------------------------------------------------------------------
|
||||
|
||||
inline int bcos(const int ang, int shift = 0)
|
||||
inline int bcos(const int ang)
|
||||
{
|
||||
return int(g_cosbam(ang * BAMUNIT) * sinscale(shift));
|
||||
return int(g_cosbam(ang * BAMUNIT) * 16384);
|
||||
}
|
||||
|
||||
//---------------------------------------------------------------------------
|
||||
|
|
Loading…
Reference in a new issue