Wiki
Clone wikiDWScript / InternalMathsFunctions
- summary Internal Maths Functions
Internal Maths functions
- [InternalOdd Odd](i : Integer) : returns True if i is odd
- [InternalCos Cos](a : Float) : returns the cosine of an angle in radians
- [InternalSin Sin](a : Float) : returns the sine of an angle in radians
- [InternalTan Tan](a : Float) : returns the tangent of an angle in radians
- [InternalCotan Cotan](a : Float) : returns the cotangent of an angle in radians
- [InternalSinh Cosh](a : Float) : returns the hyperbolic cosine of a
- [InternalSinh Sinh](a : Float) : returns the hyperbolic sine of a
- [InternalSinh Tanh](a : Float) : returns the hyperbolic tangent of a
- [InternalArcSin ArcSin](v : Float) : returns the arc-sine in radians
- [InternalArcCos ArcCos](v : Float) : returns the arc-cosine in radians
- [InternalArcTan ArcTan](v : Float) : returns the arc-tangent in radians
- [InternalArcTan2 ArcTan2](y, x : Float) : returns the arc-tangent in radians of the angle between y and x
- [InternalArcSinh ArcSinh](v : Float) : returns the inverse hyperbolic sine of v
- [InternalArcCosh ArcCosh](v : Float) : returns the inverse hyperbolic cosine of v
- [InternalArcTanh ArcTanh](v : Float) : returns the inverse hyperbolic tangent of v
- [InternalHypot Hypot](x, y : Float) : returns the length of the hypotenuse of a right triangle with sides of lengths x and y
- [InternalFactorial Factorial](v : integer) : returns the factorial of v
- [InternalExp Exp](v : Float) : returns the mathematical constant e, raised to the power of the argument v
- [InternalLn Ln](v : Float) : returns the natural logarithm of v
- [InternalLog2 Log2](v : Float) : returns the base 2 logarithm of v
- [InternalLog10 Log10](v : Float) : returns the base 10 logarithm of v
- [InternalLogN LogN](v : Float) : returns the base n logarithm of x
- [InternalPower Power](base, exponent : Float) : returns the base value raised to the power of the exponent argument
- [InternalIntPower IntPower](base : Float; exponent : integer) : returns the base value raised to the power of the exponent argument, where exponent is an integer
- [InternalSqrt Sqrt](v : Float) : returns the square root of v
- [InternalInt Int](v : Float) : returns the integer part of v
- [InternalFrac Frac](v : Float) : returns the fractional part of v
- [InternalFloor Floor](v : Float) : returns the next integer less than or equal to v
- [InternalCeil Ceil](v : Float) : returns the next integer greater than or equal to v
- [InternalTrunc Trunc](v : Float) : returns the integer part of v
- [InternalRound Round](v : Float) : rounds v to the nearest integer
- [InternalDegToRad DegToRad](a : Float) : converts the angle a from degrees to radians
- [InternalRadToDeg RadToDeg](a : Float) : converts the angle a from radians to degrees
- [InternalSign Sign](v : Float) : returns the sign of v: -1 for negative values, 0 for zero, or 1 for positive values
- [InternalSign Sign](v : Integer) : returns the sign of v: -1 for negative values, 0 for zero, or 1 for positive values
- [InternalMax Max](v1, v2 : Float) : returns v1 or v2, whichever is greater
- [InternalMax Max](v1, v2 : Integer) : returns v1 or v2, whichever is greater
- [InternalMax MaxInt](v1, v2 : Integer) : Same as the integer version of Max, above
- [InternalMin Min](v1, v2 : Float) : returns v1 or v2, whichever is less
- [InternalMin Min](v1, v2 : Integer) : returns v1 or v2, whichever is less
- [InternalMin MinInt](v1, v2 : Integer) : Same as the integer version of Min, above
- [InternalClamp Clamp](v, min, max : Float) : returns v if it is within the range defined by min and max, or either min or max, depending on whether v was less than min or greater than max
- [InternalClampInt ClampInt](v, min, max : Integer) : returns v if it is within the range defined by min and max, or either min or max, depending on whether v was less than min or greater than max
- [InternalPi Pi] : returns the mathematical constant Pi
- [InternalGcd Gcd](a, b : Integer) : returns the greatest common denominator of a and b
- [InternalLcm Lcm](a, b : Integer) : returns the least common multiple of a and b
- [InternalIsPrime IsPrime](n : Integer) : returns true if n is prime, or false otherwise
- [InternalLeastFactor LeastFactor](n : Integer) : returns the smallest prime factor of n
- [InternalRandom Random] : returns a random float in the range [0 <= result < 1]
- [InternalRandomInt RandomInt](range : Integer) : returns a random integer in the range [0 <= result < range]
- [InternalRandomize Randomize] : Initializes the random number generator
- [InternalRandG RandG](mean, stdDev : Float) : returns a random value from the distribution curve described by the mean and standard deviation arguments
- [InternalRandSeed RandSeed] : Returns the current seed of the random number generator. *Deprecated*
- [InternalSetRandSeed SetRandSeed](seed : Integer) : Sets a new seed for the random number generator.
Updated