mirror of
https://github.com/zeldaret/oot.git
synced 2024-11-29 03:34:07 +00:00
Name fmodf (#1162)
This commit is contained in:
parent
ed6ec5bceb
commit
362bc5e613
5 changed files with 15 additions and 15 deletions
2
Makefile
2
Makefile
|
@ -188,7 +188,7 @@ build/src/code/fault_drawer.o: OPTFLAGS := -O2 -g3
|
||||||
build/src/code/ucode_disas.o: OPTFLAGS := -O2 -g3
|
build/src/code/ucode_disas.o: OPTFLAGS := -O2 -g3
|
||||||
build/src/code/code_801068B0.o: OPTFLAGS := -g
|
build/src/code/code_801068B0.o: OPTFLAGS := -g
|
||||||
build/src/code/code_80106860.o: OPTFLAGS := -g
|
build/src/code/code_80106860.o: OPTFLAGS := -g
|
||||||
build/src/code/code_801067F0.o: OPTFLAGS := -g
|
build/src/code/fmodf.o: OPTFLAGS := -g
|
||||||
|
|
||||||
build/src/libultra/libc/absf.o: OPTFLAGS := -O2 -g3
|
build/src/libultra/libc/absf.o: OPTFLAGS := -O2 -g3
|
||||||
build/src/libultra/libc/sqrt.o: OPTFLAGS := -O2 -g3
|
build/src/libultra/libc/sqrt.o: OPTFLAGS := -O2 -g3
|
||||||
|
|
|
@ -11,7 +11,7 @@
|
||||||
|
|
||||||
# Unused
|
# Unused
|
||||||
glabel D_8012ABC0
|
glabel D_8012ABC0
|
||||||
.word func_801067F0 # fmodf?
|
.word fmodf
|
||||||
.word guScale
|
.word guScale
|
||||||
.word guRotate
|
.word guRotate
|
||||||
.word guTranslate
|
.word guTranslate
|
||||||
|
|
2
spec
2
spec
|
@ -509,7 +509,7 @@ beginseg
|
||||||
include "build/src/libultra/io/spsetpc.o"
|
include "build/src/libultra/io/spsetpc.o"
|
||||||
include "build/src/libultra/libc/sqrt.o"
|
include "build/src/libultra/libc/sqrt.o"
|
||||||
include "build/src/libultra/libc/absf.o"
|
include "build/src/libultra/libc/absf.o"
|
||||||
include "build/src/code/code_801067F0.o"
|
include "build/src/code/fmodf.o"
|
||||||
include "build/src/code/code_80106860.o"
|
include "build/src/code/code_80106860.o"
|
||||||
include "build/src/code/code_801068B0.o"
|
include "build/src/code/code_801068B0.o"
|
||||||
include_data_with_rodata "build/src/code/z_message_PAL.o"
|
include_data_with_rodata "build/src/code/z_message_PAL.o"
|
||||||
|
|
|
@ -1,12 +0,0 @@
|
||||||
#include "global.h"
|
|
||||||
|
|
||||||
// fmodf?
|
|
||||||
f32 func_801067F0(f32 arg0, f32 arg1) {
|
|
||||||
s32 sp4;
|
|
||||||
|
|
||||||
if (arg1 == 0.0f) {
|
|
||||||
return 0.0f;
|
|
||||||
}
|
|
||||||
sp4 = arg0 / arg1;
|
|
||||||
return arg0 - (sp4 * arg1);
|
|
||||||
}
|
|
12
src/code/fmodf.c
Normal file
12
src/code/fmodf.c
Normal file
|
@ -0,0 +1,12 @@
|
||||||
|
#include "global.h"
|
||||||
|
|
||||||
|
f32 fmodf(f32 x, f32 y) {
|
||||||
|
s32 quot;
|
||||||
|
|
||||||
|
if (y == 0.0f) {
|
||||||
|
return 0.0f;
|
||||||
|
}
|
||||||
|
quot = x / y;
|
||||||
|
|
||||||
|
return x - (quot * y);
|
||||||
|
}
|
Loading…
Reference in a new issue