scsl 1.0.1
Shimmering Clarity Standard Library
Loading...
Searching...
No Matches
Namespaces | Functions | Variables
scmp Namespace Reference

Shimmering Clarity Math & Physics toolkit. More...

Namespaces

namespace  estimation
 Algorithms for estimation position, and system state.
 
namespace  geom
 Geometry-related code.
 

Functions

std::vector< int > Die (int m, int n)
 Roll m die of n sides, returning a vector of the dice.
 
int DieTotal (int m, int n)
 Roll m die of n sides, returning the total of the die.
 
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.
 
double RadiansToDegreesD (double rads)
 Convert radians to degrees.
 
float DegreesToRadiansF (float degrees)
 Convert degrees to radians.
 
double DegreesToRadiansD (double degrees)
 Convert degrees to radians.
 
double RotateRadians (double theta0, double theta1)
 RotateRadians rotates theta0 by theta1 radians, wrapping the result to MIN_RADIAN <= result <= MAX_RADIAN.
 
void DefaultEpsilon (double &epsilon)
 Get the default epsilon value.
 
void DefaultEpsilon (float &epsilon)
 Get the default epsilon value.
 
void DefaultEpsilon (int &epsilon)
 Get the default epsilon for integer types.
 

Variables

constexpr double MAX_RADIAN = 2 * M_PI
 MAX_RADIAN is a precomputed 2 * M_PI.
 
constexpr double MIN_RADIAN = -2 * M_PI
 
constexpr double PI_D = 3.141592653589793
 

Detailed Description

Shimmering Clarity Math & Physics toolkit.

scmp contains the chimmering clarity math and physics code.

The Shimmering Clarity contains code related to math and physics, particularly as relevant to game programming and robotics.

Function Documentation

◆ BestDie()

int scmp::BestDie ( int  k,
int  m,
int  n 
)

Roll m die of n sides, and take the total of the top k die.

◆ DefaultEpsilon() [1/3]

void scmp::DefaultEpsilon ( double &  epsilon)

Get the default epsilon value.

Parameters
epsilonThe variable to store the epsilon value in.

◆ DefaultEpsilon() [2/3]

void scmp::DefaultEpsilon ( float &  epsilon)

Get the default epsilon value.

Parameters
epsilonThe variable to store the epsilon value in.

◆ DefaultEpsilon() [3/3]

void scmp::DefaultEpsilon ( int &  epsilon)

Get the default epsilon for integer types.

Parameters
epsilonThe variable to store the epsilon value in.

◆ DegreesToRadiansD()

double scmp::DegreesToRadiansD ( double  degrees)

Convert degrees to radians.

Parameters
degreesthe Angle in degrees
Returns
the Angle in radians.

◆ DegreesToRadiansF()

float scmp::DegreesToRadiansF ( float  degrees)

Convert degrees to radians.

Parameters
degreesthe Angle in degrees
Returns
the Angle in radians.

◆ Die()

std::vector< int > scmp::Die ( int  m,
int  n 
)

Roll m die of n sides, returning a vector of the dice.

◆ DieTotal()

int scmp::DieTotal ( int  m,
int  n 
)

Roll m die of n sides, returning the total of the die.

◆ RadiansToDegreesD()

double scmp::RadiansToDegreesD ( double  rads)

Convert radians to degrees.

Parameters
radsthe Angle in radians
Returns
the Angle in degrees.

◆ RadiansToDegreesF()

float scmp::RadiansToDegreesF ( float  rads)

Convert radians to degrees.

Parameters
radsthe Angle in radians
Returns
the Angle in degrees.

◆ RotateRadians()

double scmp::RotateRadians ( double  theta0,
double  theta1 
)

RotateRadians rotates theta0 by theta1 radians, wrapping the result to MIN_RADIAN <= result <= MAX_RADIAN.

Parameters
theta0
theta1
Returns

Variable Documentation

◆ MAX_RADIAN

constexpr double scmp::MAX_RADIAN = 2 * M_PI
constexpr

MAX_RADIAN is a precomputed 2 * M_PI.

◆ MIN_RADIAN

constexpr double scmp::MIN_RADIAN = -2 * M_PI
constexpr

◆ PI_D

constexpr double scmp::PI_D = 3.141592653589793
constexpr