25#ifndef SCSL_SCMP_MATH_H
26#define SCSL_SCMP_MATH_H
37constexpr double PI_D = 3.141592653589793;
41std::vector<int>
Die(
int m,
int n);
112WithinTolerance(T a, T b, T epsilon)
114 return std::abs(a - b) <= epsilon;
Shimmering Clarity Math & Physics toolkit.
Definition estimation.h:31
double RotateRadians(double theta0, double theta1)
RotateRadians rotates theta0 by theta1 radians, wrapping the result to MIN_RADIAN <= result <= MAX_RA...
double RadiansToDegreesD(double rads)
Convert radians to degrees.
float DegreesToRadiansF(float degrees)
Convert degrees to radians.
constexpr double MIN_RADIAN
Definition Math.h:36
double DegreesToRadiansD(double degrees)
Convert degrees to radians.
void DefaultEpsilon(double &epsilon)
Get the default epsilon value.
int BestDie(int k, int m, int n)
Roll m die of n sides, and take the total of the top k die.
float RadiansToDegreesF(float rads)
Convert radians to degrees.
std::vector< int > Die(int m, int n)
Roll m die of n sides, returning a vector of the dice.
constexpr double MAX_RADIAN
MAX_RADIAN is a precomputed 2 * M_PI.
Definition Math.h:35
int DieTotal(int m, int n)
Roll m die of n sides, returning the total of the die.
constexpr double PI_D
Definition Math.h:37