29 lines
902 B
C
29 lines
902 B
C
// Part of JoeyLib, Copyright (c) 2026 Scott Duensing, under the MIT License.
|
|
// See LICENSE.md for license information.
|
|
// SPDX-License-Identifier: MIT
|
|
//
|
|
// Minimal math.h shim for the m68k-atari-mint toolchain (mintlib
|
|
// doesn't ship <math.h> or libm). Declares the few functions libxmp-lite
|
|
// once reached for; the implementations live in math_shim.c next to this
|
|
// header, built into the ST's libjoey.a. Accuracy is a few hundred parts
|
|
// per million, not for general-purpose use.
|
|
|
|
#ifndef JOEY_ATARIST_MATH_SHIM_H
|
|
#define JOEY_ATARIST_MATH_SHIM_H
|
|
|
|
#define M_LN2 0.69314718055994530942
|
|
#define M_PI 3.14159265358979323846
|
|
|
|
double ceil(double x);
|
|
double floor(double x);
|
|
double log(double x);
|
|
double pow(double base, double exp);
|
|
double trunc(double x);
|
|
|
|
float ceilf(float x);
|
|
float floorf(float x);
|
|
float logf(float x);
|
|
float powf(float base, float exp);
|
|
float truncf(float x);
|
|
|
|
#endif
|