Floating point maths functions.
Code Map
//! Floating point maths functions.
module watt.math.floating;
//! The number PI as a constant.
enum PIf;
//! The number PI as a constant.
enum PI;
//! Calculate the sine function of a number.
alias sin = sinf;
//! Calculate the arc sine function of a number.
alias asin = asinf;
//! Calculate the cosine function of a number.
alias cos = cosf;
//! Calculate the arc cosine function of a number.
alias acos = acosf;
//! Calculate the tangent function of a number.
alias tan = tanf;
//! Calculate the arc tangent function of a number.
alias atan = atanf;
//! Calculate the square root of a number.
alias sqrt = sqrtf;
//! Calculate the sine function of a number.
fn sin(f64) f64;
//! Calculate the sine function of a number.
fn sinf(f32) f32;
//! Calculate the arc sine function of a number.
fn asin(f64) f64;
//! Calculate the arc sine function of a number.
fn asinf(f32) f32;
//! Calculate the cosine function of a number.
fn cos(f64) f64;
//! Calculate the cosine function of a number.
fn cosf(f32) f32;
//! Calculate the arc cosine function of a number.
fn acos(f64) f64;
//! Calculate the arc cosine function of a number.
fn acosf(f32) f32;
//! Calculate the tangent function of a number.
fn tan(f64) f64;
//! Calculate the tangent function of a number.
fn tanf(f32) f32;
//! Calculate the arc tangent function of a number.
fn atan(f64) f64;
//! Calculate the arc tangent function of a number.
fn atanf(f32) f32;
//! Calculate the square root of a number.
fn sqrt(f64) f64;
//! Calculate the square root of a number.
fn sqrtf(f32) f32;
//! Convert radians into degrees.
fn radians(degs: f64) f64 { }
//! Convert degrees into radians.
fn degrees(rads: f64) f64 { }
//! Round a value down.
fn floor(f32) f32;
//! Round a value down.
fn floor(f64) f64;
//! Round a value up.
fn ceil(f32) f32;
//! Round a value up.
fn ceil(f64) f64;
//! Round a value to the nearest integer.
fn round(f32) f32;
//! Round a value to the nearest integer.
fn round(f64) f64;
//! Raise the value to the given (positive or negative) power.
fn pow(value: f32, power: f32) f32;
//! Raise the value to the given (positive or negative) power.
fn pow(value: f64, power: f64) f64;
fn abs(f32) f32;
fn abs(f64) f64;
The number PI as a constant.
The number PI as a constant.
Calculate the sine function of a number.
Calculate the sine function of a number.
Calculate the sine function of a number.
Calculate the arc sine function of a number.
Calculate the arc sine function of a number.
Calculate the arc sine function of a number.
Calculate the cosine function of a number.
Calculate the cosine function of a number.
Calculate the cosine function of a number.
Calculate the arc cosine function of a number.
Calculate the arc cosine function of a number.
Calculate the arc cosine function of a number.
Calculate the tangent function of a number.
Calculate the tangent function of a number.
Calculate the tangent function of a number.
Calculate the arc tangent function of a number.
Calculate the arc tangent function of a number.
Calculate the arc tangent function of a number.
Calculate the square root of a number.
Calculate the square root of a number.
Calculate the square root of a number.
Convert radians into degrees.
Convert degrees into radians.
Round a value down.
Round a value up.
Round a value to the nearest integer.
Raise the value to the given (positive or negative) power.
Parameters
value |
The value to power. |
power |
Number to reaise the value with. |
Return
the absolute value of the given argument.