Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
SRB2
Project
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
262
Issues
262
List
Board
Labels
Milestones
Merge Requests
67
Merge Requests
67
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Open sidebar
STJr
SRB2
Commits
8b801921
Commit
8b801921
authored
May 18, 2020
by
GoldenTails
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Deprecate FixedRem.
It's about time!
parent
536104fc
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
3 additions
and
14 deletions
+3
-14
lua_mathlib.c
src/lua_mathlib.c
+2
-1
m_fixed.h
src/m_fixed.h
+0
-12
tables.c
src/tables.c
+1
-1
No files found.
src/lua_mathlib.c
View file @
8b801921
...
...
@@ -113,7 +113,8 @@ static int lib_fixeddiv(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
;
}
...
...
src/m_fixed.h
View file @
8b801921
...
...
@@ -204,18 +204,6 @@ FUNCMATH FUNCINLINE static ATTRINLINE fixed_t FixedDiv(fixed_t a, fixed_t 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
\param x fixed_t number
...
...
src/tables.c
View file @
8b801921
...
...
@@ -72,7 +72,7 @@ static FUNCMATH angle_t AngleAdj(const fixed_t fa, const fixed_t wf,
const
angle_t
adj
=
0x77
;
const
boolean
fan
=
fa
<
0
;
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
;
if
(
ra
==
0
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment