Class Reference math

Mathematic function to use in LayoutEditor C++ Macros. More...

Member

double acos(double x)
double asin(double x)
double atan(double x)
double ceil(double x)
double cos(double x)
double cosh(double x)
double exp(double a)
double floor(double a)
double log10(double a)
double log(double x)
double pow(double x,double y)
double round(double x)
double sin(double x)
double sinh(double x)
double sqrt(double x)
double tan(double x)
double tanh(double x)
double trunc(double x)
const double e
const double ln10
const double ln2
const double log10e
const double log2e
const double pi
const double pi_2
const double pi_4
const double sqrt1_2
const double sqrt2

Detailed Description

Class to access math functions similar to the standard C library math.h.

Example:

double radius=math::acos(0.5678);
double circumference=2*math::pi*radius;

This class exists only for the LayoutEditor C++ Macros. It is not available in the other interfaces, as there are native ways for this mathematical features.

Member Function Documentation


static double math::acos(double x)

The acos() function calculates the arc cosine of x; that is the value whose cosine is x. It is also called inverse cosine.

Returns: acos(x)

Example:

double d=math::acos(0.5678);

static double math::asin(double x)

The asin() function calculates the principal value of the arc sine of x, that is the value whose sine is x. It is also called inverse sine.

Returns: asin(x)


static double math::atan(double x)

The atan() function calculates the principal value of the arc tangent of x, that is the value whose tangent is x.

Returns: atan(x)


static double math::ceil(double x)

The smallest integral value that is not less than x. (introduced with release 20200224)

Returns: ceil(x)


static double math::cos(double x)

The cos() function returns the cosine of x, where x is given in radians.

Returns: cos(x)


static double math::cosh(double x)

The cosh() function returns the hyperbolic cosine of x, which is defined mathematically as:

cosh(x) = (exp(x) + exp(-x)) / 2

Returns: cosh(x)


static double math::exp(double a)

The exp() function returns the value of e (the base of natural logarithms) raised to the power of a.

Returns: exp(a)


static double math::floor(double a)

These functions return the largest integral value that is not greater than a.

Returns: floor(a)


static double math::log10(double a)

This functions return the base 10 logarithm of a.

Returns: log10(a)


static double math::log(double x)

The log() function returns the natural logarithm of x.

Returns: log(x)


static double math::pow(double x,double y)

The pow() function returns the value of x raised to the power of y.

Returns: pow(x,y)


static double math::round(double x)

These functions round x to the nearest integer

Returns: round(x)


static double math::sin(double x)

The sin() function returns the sine of x, where x is given in radians.

Returns: sin(x)


static double math::sinh(double x)

The sinh() function returns the hyperbolic sine of x, which is defined mathematically as:

sinh(x) = (exp(x) - exp(-x)) / 2

Returns: sinh(x)


static double math::sqrt(double x)

The sqrt() function returns the non-negative square root of x.

Returns: sqrt(x)


static double math::tan(double x)

The tan() function returns the tangent of x, where x is given in radians.

Returns: tan(x)


static double math::tanh(double x)

The tanh() function returns the hyperbolic tangent of x, which is defined mathematically as:

tanh(x) = sinh(x) / cosh(x)

Returns: tanh(x)


static double math::trunc(double x)

The nearest integral value that is not larger in magnitude than x. (introduced with release 20200224)

Returns: trunc(x)


static const double math::e

Returns: 2.71828182845904523536


static const double math::ln10

Returns: ln(10)=2.30258509299404568402


static const double math::ln2

Returns: ln(2)=0.693147180559945309417


static const double math::log10e

Returns: log10(e)=0.434294481903251827651


static const double math::log2e

Returns: log2(e)=1.44269504088896340736


static const double math::pi

Returns: 3.14159265358979323846


static const double math::pi_2

Returns: pi/2=1.57079632679489661923


static const double math::pi_4

Returns: pi/4=0.785398163397448309616


static const double math::sqrt1_2

Returns: 1/sqrt(2)=0.707106781186547524401


static const double math::sqrt2

Returns: sqrt(2)=1.41421356237309504880