mirror of
https://github.com/seekrs/MacroLibX.git
synced 2026-01-11 14:43:34 +00:00
fixing macos and windows CI ? x3
This commit is contained in:
@@ -147,27 +147,37 @@ namespace mlx
|
|||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
template<typename T>
|
#ifdef MLX_PLAT_LINUX
|
||||||
void SinCos(T x, T* sin, T* cos)
|
template<typename T>
|
||||||
{
|
void SinCos(T x, T* sin, T* cos)
|
||||||
double s, c;
|
{
|
||||||
::sincos(x, &s, &c);
|
double s, c;
|
||||||
|
::sincos(x, &s, &c);
|
||||||
|
|
||||||
*sin = static_cast<T>(s);
|
|
||||||
*cos = static_cast<T>(c);
|
|
||||||
}
|
|
||||||
|
|
||||||
template<>
|
*sin = static_cast<T>(s);
|
||||||
inline void SinCos(float x, float* s, float* c)
|
*cos = static_cast<T>(c);
|
||||||
{
|
}
|
||||||
::sincosf(x, s, c);
|
|
||||||
}
|
|
||||||
|
|
||||||
template<>
|
template<>
|
||||||
inline void SinCos(long double x, long double* s, long double* c)
|
inline void SinCos(float x, float* s, float* c)
|
||||||
{
|
{
|
||||||
::sincosl(x, s, c);
|
::sincosf(x, s, c);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
template<>
|
||||||
|
inline void SinCos(long double x, long double* s, long double* c)
|
||||||
|
{
|
||||||
|
::sincosl(x, s, c);
|
||||||
|
}
|
||||||
|
#else
|
||||||
|
template<typename T>
|
||||||
|
void SinCos(T x, T* sin, T* cos)
|
||||||
|
{
|
||||||
|
*sin = std::sin(x);
|
||||||
|
*cos = std::cos(x);
|
||||||
|
}
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
template<AngleUnit Unit, typename T>
|
template<AngleUnit Unit, typename T>
|
||||||
|
|||||||
@@ -47,7 +47,7 @@
|
|||||||
#include <iterator>
|
#include <iterator>
|
||||||
#include <stb_truetype.h>
|
#include <stb_truetype.h>
|
||||||
#include <variant>
|
#include <variant>
|
||||||
#if defined(MLX_PLAT_MACOS) || defined(MLX_PLAT_LINUX) || defined(MLX_PLAT_UNIX)
|
#if defined(MLX_PLAT_LINUX)
|
||||||
#include <math.h> // sincos
|
#include <math.h> // sincos
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|||||||
@@ -50,7 +50,7 @@ target("mlx")
|
|||||||
add_options("force_wayland")
|
add_options("force_wayland")
|
||||||
add_includedirs("runtime/Includes", "runtime/Sources", "includes", "third_party")
|
add_includedirs("runtime/Includes", "runtime/Sources", "includes", "third_party")
|
||||||
|
|
||||||
set_pcxxheader("runtime/Sources/PreCompiled.h")
|
set_pcxxheader("runtime/Includes/PreCompiled.h")
|
||||||
|
|
||||||
add_defines("MLX_BUILD", "SDL_MAIN_HANDLED")
|
add_defines("MLX_BUILD", "SDL_MAIN_HANDLED")
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user