std.math¶
Module entries: abs()
, abs()
, abs()
, acos()
, asin()
, atan2()
, ceil()
, cos()
, exp()
, fmod()
, max()
, max()
, max()
, max()
, min()
, min()
, min()
, min()
, pow()
, sin()
, sqrt()
, tan()
, trunc()
- abs(i)¶
int abs(int i)
Returns the absolute (ie. positive) value of the parameter.
- abs(f)¶
float abs(float f)
Returns the absolute (ie. positive) value of the parameter.
- abs(d)¶
double abs(double d)
Returns the absolute (ie. positive) value of the parameter.
- acos(f)¶
float acos(float f)
Returns the arc cosine of the parameter.
- asin(f)¶
float asin(float f)
TODO: document
- atan2(y, x)¶
float atan2(float y, float x)
Returns the arc tangent of y/x. This is the angle between a point (x, y) and the X axis.
- ceil(x)¶
float ceil(float x)
TODO: document
- cos(f)¶
float cos(float f)
Returns the cosine of the parameter in radians.
- exp(f)¶
float exp(float f)
Returns the exponential value of the parameter.
- fmod(x, y)¶
float fmod(float x, float y)
TODO: document
- max(a, b)¶
double max(double a, double b)
Returns the maximum of
a
andb
.Example:
assert(max(2, 3) == 3); assert(max(-4.5, -5.0) == -4.5);
- max(a, b)¶
int max(int a, int b)
Returns the maximum of
a
andb
.
- max(a, b)¶
long max(long a, long b)
Returns the maximum of
a
andb
.
- max(a, b)¶
float max(float a, float b)
Returns the maximum of
a
andb
.
- min(a, b)¶
double min(double a, double b)
Returns the minimum of
a
andb
.Example:
assert(min(2, 3) == 2); assert(min(-4.5, -5.0) == -5);
- min(a, b)¶
float min(float a, float b)
Returns the minimum of
a
andb
.
- min(a, b)¶
long min(long a, long b)
Returns the minimum of
a
andb
.
- min(a, b)¶
int min(int a, int b)
Returns the minimum of
a
andb
.
- pow(x, y)¶
float pow(float x, float y)
Returns
x
raised to the power ofy
.
- sin(f)¶
float sin(float f)
Returns the sine of the parameter in radians.
- sqrt(f)¶
float sqrt(float f)
Returns the square root of f.
- tan(f)¶
float tan(float f)
Returns the tangent of the parameter in radians.
- trunc(x)¶
float trunc(float x)
TODO: document