mirror of
https://github.com/zeldaret/oot.git
synced 2025-07-14 03:44:34 +00:00
Lightweight trigonometry doc (#1356)
* Doc units of trig functions * "Very simple" yet I made a mistake * sins returns in [-0x7FFF,0x7FFF] as the [-1,1] range * Also `sys_math_atan.c` * Remove `@param`s without descriptions * Add note on Math_Atan2S/F arguments being unlike atan2 * "from (1,0) to (x,y)" -> "from vector ..." * arg names -> `angle` * Improve `@return` comment on atans
This commit is contained in:
parent
0b38f6e678
commit
0283493db8
10 changed files with 104 additions and 40 deletions
|
@ -23,10 +23,18 @@ void Lib_MemSet(u8* dest, size_t len, u8 val) {
|
|||
// clang-format on
|
||||
}
|
||||
|
||||
/**
|
||||
* @param angle binang
|
||||
* @return cos(angle)
|
||||
*/
|
||||
f32 Math_CosS(s16 angle) {
|
||||
return coss(angle) * SHT_MINV;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param angle binang
|
||||
* @return sin(angle)
|
||||
*/
|
||||
f32 Math_SinS(s16 angle) {
|
||||
return sins(angle) * SHT_MINV;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue