-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Move nds trig functions to ds-trig.c
- Loading branch information
1 parent
4ab3e47
commit afd781b
Showing
4 changed files
with
24 additions
and
23 deletions.
There are no files selected for viewing
Binary file not shown.
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
#ifndef PC_TARGET | ||
|
||
#include <nds.h> | ||
|
||
/* | ||
NDS trigonometry routines. | ||
Copied from sin() and cos() in nehe11.cpp, written by Dovoto. | ||
*/ | ||
|
||
float my_sin(float angle) | ||
{ | ||
int32 s = sinLerp((int)((angle * DEGREES_IN_CIRCLE) / 360.0)); | ||
|
||
return f32tofloat(s); | ||
} | ||
|
||
float my_cos(float angle) | ||
{ | ||
int32 c = cosLerp((int)((angle * DEGREES_IN_CIRCLE) / 360.0)); | ||
|
||
return f32tofloat(c); | ||
} | ||
|
||
#endif |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters