coastline 0.0.4
Loading...
Searching...
No Matches
mathutil.h File Reference

Small numeric helpers. More...

#include "common/types.h"
Include dependency graph for mathutil.h:

Go to the source code of this file.

Functions

s32 FloatToInt (float value)
 Convert a float to an integer, truncating towards zero.

Detailed Description

Small numeric helpers.

Function Documentation

◆ FloatToInt()

s32 FloatToInt ( float value)

Convert a float to an integer, truncating towards zero.

Parameters
valueThe value to convert.
Returns
The truncated value. The patched SDL build returns the low 32 bits of the original 64-bit conversion, or zero for out-of-range values, NaN, and infinity.
Ghidra address:
USA: 0x802562e0
Ghidra address:
Asia: 0x80255E30
Ghidra address:
EUR: 0x802578b0
Ghidra address:
JPN: 0x80257240
Ghidra address:
BRD3D: 0x1002b920
Ghidra address:
BRGlide: 0x10018990