1
0
Fork 0
mirror of https://github.com/zeldaret/oot.git synced 2025-07-03 06:24:30 +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

@ -618,7 +618,7 @@ void BossGanon_IntroCutscene(BossGanon* this, PlayState* play) {
this->csCamEye.z = 300.0f;
this->csCamAt.x = 0.0f;
this->unk_704 = 1.2566371f;
this->unk_704 = 2 * M_PI / 5;
FALLTHROUGH;
case 3:
this->envLightMode = 0;
@ -3178,8 +3178,8 @@ void BossGanon_Update(Actor* thisx, PlayState* play2) {
this->unk_278.y = this->unk_2EC[0].y + 50.0f + 30.0f;
this->unk_278.z = this->unk_2EC[0].z;
xOffset = (sinf(i * 1.2566371f) * 600.0f);
zOffset = (cosf(i * 1.2566371f) * 600.0f);
xOffset = (sinf(i * (2 * M_PI / 5)) * 600.0f);
zOffset = (cosf(i * (2 * M_PI / 5)) * 600.0f);
// 5 or 6 light balls that go into the charge. not the same as the ones that he throws
Actor_SpawnAsChild(&play->actorCtx, &this->actor, play, ACTOR_BOSS_GANON, this->unk_1FC.x + xOffset,