omi-eikyo/src/m_math.h

21 lines
483 B
C
Raw Normal View History

2017-09-26 13:58:44 -07:00
// Copyright © 2017 Project Golan, all rights reserved.
#ifndef m_math_h
#define m_math_h
#include "m_types.h"
2017-09-29 04:50:36 -07:00
#include <math.h>
#define M_pi (3.14159265359)
#define M_pi2 (M_pi / 2.0)
#define M_tau (M_pi * 2.0)
#define M_angle(n) (fmod((n) * M_tau - M_pi2, M_tau))
2017-09-26 13:58:44 -07:00
// Extern Functions ----------------------------------------------------------|
bool M_AABBPoint(fixed xl, fixed yl, fixed xu, fixed yu, fixed xp, fixed yp);
2017-09-29 04:50:36 -07:00
float M_Random_Float(float min, float max);
2017-09-26 13:58:44 -07:00
#endif