Programming Reference for VirtualLab Fusion  2026.1
Loading...
Searching...
No Matches
MathSupport Class Reference

This class contains various mathematical functions and constants. More...

Static Public Member Functions

static double Pow (double baseNumber, double exponent)
 Raises the double number to the given power.
 
static int RoundToInt (double valueToRound)
 This function rounds to closest integer. The difference to Math.Round is that n + 0.5 is always rounded to n + 1.
 

Static Public Attributes

const double Epsilon
 Declaration of an epsilon to check whether two values (influenced by numerical errors) are equal. In other words, two values \(a\) and \(b\) are considered as identical if \(b \cdot (1 - \epsilon) \geq a \geq b \cdot (1 + \epsilon)\).
 
const double OneDegree
 One degree (1°) in radians. Can be used for easy conversion between degrees and radians.
 

Detailed Description

This class contains various mathematical functions and constants.

Member Function Documentation

◆ Pow()

static double Pow ( double baseNumber,
double exponent )
static

Raises the double number to the given power.

Parameters
baseNumberThe base.
exponentThe exponent.
Returns
The double number to the power of the exponent.

◆ RoundToInt()

static int RoundToInt ( double valueToRound)
static

This function rounds to closest integer. The difference to Math.Round is that n + 0.5 is always rounded to n + 1.

Parameters
valueToRoundValue to be rounded.
Returns
Result of operation.