mirror of
https://github.com/pret/pmd-sky.git
synced 2026-08-27 21:25:43 -05:00
Decomp IntToFixedPoint64
This commit is contained in:
@@ -4,5 +4,6 @@
|
||||
#include "util.h"
|
||||
|
||||
u32 sub_02001BB4(s32 x, s32 y);
|
||||
void IntToFixedPoint64(struct fixed_point_64* out, s32 x);
|
||||
|
||||
#endif //PMDSKY_MAIN_02001BB4_H
|
||||
|
||||
@@ -32,6 +32,13 @@ struct fixed_point {
|
||||
s16 fractional;
|
||||
};
|
||||
|
||||
// 64-bit signed fixed-point number with 16 fraction bits.
|
||||
// Represents the number ((upper << 16) + (lower >> 16) + (lower & 0xFFFF) * 2^-16)
|
||||
struct fixed_point_64 {
|
||||
s32 upper; // sign bit, plus the 31 most significant integer bits
|
||||
u32 lower; // the 32 least significant bits (16 integer + 16 fraction)
|
||||
};
|
||||
|
||||
// Compares two numbers and return the minimum
|
||||
#define MIN(A, B) ((A > B) ? B : A)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user