X-Git-Url: http://git.mutantstargoat.com/user/nuclear/?a=blobdiff_plain;f=libs%2Fcgmath%2Fcgmath.h;h=9f9936138a394a1a3d644b25b8f810c521a46d4a;hb=15a4548ff09afb37dd33786cafd50b060a64f840;hp=cd3de51c358ef4ce14d27a92ed38cabd28dd5c3b;hpb=7fccf8b3543c8cdb993252f0cf9a6b9ed826408e;p=retroray diff --git a/libs/cgmath/cgmath.h b/libs/cgmath/cgmath.h index cd3de51..9f99361 100644 --- a/libs/cgmath/cgmath.h +++ b/libs/cgmath/cgmath.h @@ -1,5 +1,5 @@ /* gph-cmath - C graphics math library - * Copyright (C) 2018 John Tsiombikas + * Copyright (C) 2018-2023 John Tsiombikas * * This program is free software. Feel free to use, modify, and/or redistribute * it under the terms of the MIT/X11 license. See LICENSE for details. @@ -23,16 +23,10 @@ #ifndef CGMATH_H_ #define CGMATH_H_ -#if defined(_MSC_VER) && !defined(_USE_MATH_DEFINES) -#define _USE_MATH_DEFINES -#endif - #include #include -#ifndef M_PI -#define M_PI 3.141592653589793 -#endif +#define CGM_PI 3.141592653589793 typedef struct { float x, y; @@ -66,6 +60,8 @@ typedef enum cgm_euler_mode { } cgm_euler_mode; #ifdef __cplusplus +#define CGM_INLINE inline + extern "C" { #else @@ -270,10 +266,6 @@ static CGM_INLINE void cgm_bary(cgm_vec3 *bary, const cgm_vec3 *a, static CGM_INLINE void cgm_uvec_to_sph(float *theta, float *phi, const cgm_vec3 *v); static CGM_INLINE void cgm_sph_to_uvec(cgm_vec3 *v, float theta, float phi); -#ifdef _MSC_VER -#pragma warning (disable: 4244) -#endif - #include "cgmvec3.inl" #include "cgmvec4.inl" #include "cgmquat.inl"