1
0
Fork 0
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:
Dragorn421 2022-10-15 23:29:36 +02:00 committed by GitHub
parent 0b38f6e678
commit 0283493db8
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
10 changed files with 104 additions and 40 deletions

View file

@ -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;
}