mirror of
https://github.com/pret/pmd-sky.git
synced 2026-03-21 17:25:15 -05:00
25 lines
776 B
C
25 lines
776 B
C
#ifndef PMDSKY_MATH_H
|
|
#define PMDSKY_MATH_H
|
|
|
|
#define INFINITY 999
|
|
#define INFINITY_2 999999
|
|
#define INFINITY_3 10000
|
|
|
|
#define IntToF248(x) ((int)((x) * 0x100))
|
|
#define F248ToInt(x) ((s24_8)((x) / 256))
|
|
|
|
#define F248LessThanInt(x, y) ((x) < 0x100 * (y))
|
|
#define F248LessThanFloat(x, y) ((x) < (int)((y) * 0x100))
|
|
#define FloatLessThanF248(x, y) ((int)((x) * 0x100) < (y))
|
|
#define F248LessThan(x, y) ((x) < (y))
|
|
#define F248GreaterThan(x, y) ((x) > (y))
|
|
#define F248Equal(x, y) ((x) == (y))
|
|
#define F248EqualsInt(x, y) ((x) == 0x100 * (y))
|
|
#define F248_AddInt(x, y) ((s24_8)((x) + 0x100 * (y))
|
|
#define F248_SubInt(x, y) ((s24_8)((x) - 0x100 * (y))
|
|
#define F248_Add(x, y)((x) + (y))
|
|
#define F248_Sub(x, y)((x) - (y))
|
|
#define F248_MulInt(x, y)((x) * (y))
|
|
|
|
#endif // PMDSKY_MATH_H
|