Real

Handle Wrappers View source
Real

The arctangent function with two arguments. The second argument is needed to determine the appropriate quadrant of the computed angle.

Source on GitHub

Extension Functions

real.abs

public function real.abs() returns real

Returns the abolsute value of the given real. This means, negative values will be return positive.

real.squared

public function real.squared() returns real

Returns the result of this * this, i.e. the square

real.sign

public function real.sign() returns int

Returns the sign of this real

real.round

public function real.round() returns int

Rounds the input real to the nearest int

real.trunc

public function real.trunc() returns int

Rounds the input real towards zero to the nearest int

real.floor

public function real.floor() returns int

Rounds the input real downward to the nearest int

real.ceil

public function real.ceil() returns int

Rounds the input real upward to the nearest int

real.clamp

public function real.clamp(real lowerBound, real higherBound) returns real

Limits the input real to the given range

real.toInt

public function real.toInt() returns int

Converts the input real to an int. This cuts off the decimal digits. (1.9 -> 1)

real.toString

public function real.toString() returns string

Returns the string representation of this real

real.toString

public function real.toString(int precision) returns string

Returns the string representation of this real with the given amount if digits precision

real.acos

public function real.acos() returns real

The inverse trigonometric function of cosine

real.asin

public function real.asin() returns real

The inverse trigonometric function of sine

real.atan

public function real.atan() returns real

The inverse trigonometric function of tangent

real.cos

public function real.cos() returns real

The trigonometric function of cosine

real.sin

public function real.sin() returns real

The trigonometric function of sine

real.tan

public function real.tan() returns real

The trigonometric function of tangent

real.atan2

public function real.atan2(real y) returns real

real.pow

public function real.pow(real x) returns real

Returns this real to the power of the argument real

real.lerp

public function real.lerp(real target, real alpha) returns real

Linear Interpolation with alphafactor(smoothness)

real.isBetween

public function real.isBetween(real low, real high) returns bool

Checks if this real is between low and high value

real.saturate

public function real.saturate() returns real

Clamps to [0,1]

real.inverseLerp

public function real.inverseLerp(real a, real b) returns real

t in [0,1] such that mix(a,b,t) == this (clamped)

real.smoothstep

public function real.smoothstep(real edge0, real edge1) returns real

Smoothstep from edge0 to edge1

real.smootherstep

public function real.smootherstep(real edge0, real edge1) returns real

Smootherstep from edge0 to edge1

Constants

REAL_MAX

public constant REAL_MAX = 340282366920938000000000000000000000000.

REAL_MIN

public constant REAL_MIN = -340282366920938000000000000000000000000.