mirror of
https://github.com/HarbourMasters/Shipwright.git
synced 2025-07-31 03:50:37 -07:00
[Enhancement] Add fix camera drift option to fixes menu (#1983)
This commit is contained in:
parent
aa16a5388e
commit
c569a46933
5 changed files with 32 additions and 7 deletions
|
@ -1,4 +1,5 @@
|
|||
#include "global.h"
|
||||
#include <math.h>
|
||||
|
||||
f32 Math_CosS(s16 angle) {
|
||||
return coss(angle) * SHT_MINV;
|
||||
|
@ -8,6 +9,14 @@ f32 Math_SinS(s16 angle) {
|
|||
return sins(angle) * SHT_MINV;
|
||||
}
|
||||
|
||||
f32 Math_AccurateCosS(s16 angle) {
|
||||
return cosf(DEG_TO_RAD((f32)(angle & 0xFFFC) / SHT_MAX) * 180.0f);
|
||||
}
|
||||
|
||||
f32 Math_AccurateSinS(s16 angle) {
|
||||
return sinf(DEG_TO_RAD((f32)(angle & 0xFFFC) / SHT_MAX) * 180.0f);
|
||||
}
|
||||
|
||||
/**
|
||||
* Changes pValue by step (scaled by the update rate) towards target, setting it equal when the target is reached.
|
||||
* Returns true when target is reached, false otherwise.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue