Merge branch 'deprecate-fixedrem' into 'next'
Deprecate FixedRem. See merge request STJr/SRB2!952
This commit is contained in:
commit
04c7eeb6ae
|
@ -113,7 +113,8 @@ static int lib_fixeddiv(lua_State *L)
|
||||||
|
|
||||||
static int lib_fixedrem(lua_State *L)
|
static int lib_fixedrem(lua_State *L)
|
||||||
{
|
{
|
||||||
lua_pushfixed(L, FixedRem(luaL_checkfixed(L, 1), luaL_checkfixed(L, 2)));
|
LUA_Deprecated(L, "FixedRem(a, b)", "a % b");
|
||||||
|
lua_pushfixed(L, luaL_checkfixed(L, 1) % luaL_checkfixed(L, 2));
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -204,18 +204,6 @@ FUNCMATH FUNCINLINE static ATTRINLINE fixed_t FixedDiv(fixed_t a, fixed_t b)
|
||||||
return FixedDiv2(a, b);
|
return FixedDiv2(a, b);
|
||||||
}
|
}
|
||||||
|
|
||||||
/** \brief The FixedRem function
|
|
||||||
|
|
||||||
\param x fixed_t number
|
|
||||||
\param y fixed_t number
|
|
||||||
|
|
||||||
\return remainder of dividing x by y
|
|
||||||
*/
|
|
||||||
FUNCMATH FUNCINLINE static ATTRINLINE fixed_t FixedRem(fixed_t x, fixed_t y)
|
|
||||||
{
|
|
||||||
return x % y;
|
|
||||||
}
|
|
||||||
|
|
||||||
/** \brief The FixedSqrt function
|
/** \brief The FixedSqrt function
|
||||||
|
|
||||||
\param x fixed_t number
|
\param x fixed_t number
|
||||||
|
|
|
@ -72,7 +72,7 @@ static FUNCMATH angle_t AngleAdj(const fixed_t fa, const fixed_t wf,
|
||||||
const angle_t adj = 0x77;
|
const angle_t adj = 0x77;
|
||||||
const boolean fan = fa < 0;
|
const boolean fan = fa < 0;
|
||||||
const fixed_t sl = FixedDiv(fa, wf*2);
|
const fixed_t sl = FixedDiv(fa, wf*2);
|
||||||
const fixed_t lb = FixedRem(fa, wf*2);
|
const fixed_t lb = fa % (wf*2);
|
||||||
const fixed_t lo = (wf*2)-lb;
|
const fixed_t lo = (wf*2)-lb;
|
||||||
|
|
||||||
if (ra == 0)
|
if (ra == 0)
|
||||||
|
|
Loading…
Reference in New Issue