wavelength 1.0.0
Loading...
Searching...
No Matches
sine.h File Reference

Go to the source code of this file.

Functions

void SinTableInit ()
 Build the sine tables.
void SinTableTerminate ()
 Release the quarter-wave table.
float SinApprox (float fRadians)
 Approximate a sine by interpolating the quarter-wave table.
float FastSin (float fRadians)
 Approximate a sine by reading the nearest entry of the full-turn table.

Function Documentation

◆ SinTableInit()

void SinTableInit ( )

Build the sine tables.

The quarter-wave table has the sin_table_size entries of the math block of the system configuration (32 by default) and a final 1. A second table of 256 entries covers the full turn for FastSin().

Ghidra address:
NTSC-U/C: 0x00293598
Ghidra address:
PAL: 0x0029cf60

◆ SinTableTerminate()

void SinTableTerminate ( )

Release the quarter-wave table.

Ghidra address:
NTSC-U/C: 0x002937c0
Ghidra address:
PAL: 0x0029d188

◆ SinApprox()

float SinApprox ( float fRadians)

Approximate a sine by interpolating the quarter-wave table.

Parameters
fRadiansThe angle.
Returns
The sine.
Ghidra address:
NTSC-U/C: 0x00293860
Ghidra address:
PAL: 0x0029d228

◆ FastSin()

float FastSin ( float fRadians)

Approximate a sine by reading the nearest entry of the full-turn table.

Parameters
fRadiansThe angle.
Returns
The sine.
Ghidra address:
NTSC-U/C: 0x00293958
Ghidra address:
PAL: 0x0029d320