omi-eikyo/src/m_math.h

22 lines
520 B
C

// Copyright © 2017 Project Golan, all rights reserved.
// See COPYING for more information.
#ifndef m_math_h
#define m_math_h
#include "m_types.h"
#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))
// Extern Functions ----------------------------------------------------------|
bool M_AABBPoint(fixed xl, fixed yl, fixed xu, fixed yu, fixed xp, fixed yp);
float M_Random_Float(float min, float max);
#endif