|
TorqueScript Reference
|
Functions | |
| Integer | addBitToMask (mask, bit) |
| String | bit () |
| String | bitInverse () |
| String | bits () |
| Float | mAbs (val) |
| Float | mAcos (val) |
| Float | mAsin (val) |
| Float | mAtan (val) |
| Integer | mCeil (val) |
| Float | mClamp (float number, float min, float max) |
| Float | mCos (val) |
| Float | mDegToRad (val) |
| String | mFloatLength (val, numDecimals) |
| Integer | mFloor (val) |
| Float | mGetMax (a, b) |
| Float | mGetMin (a, b) |
| Float | mLog (val) |
| Float | mPow (val, power) |
| Float | mRadToDeg (val) |
| Float | mRound (float v) |
| Float | mSin (val) |
| String | mSolveCubic (float a, float b, float c, float d) |
| String | mSolveQuadratic (float a, float b, float c) |
| String | mSolveQuartic (float a, float b, float c, float d, float e) |
| Float | mSqrt (val) |
| Float | mTan (val) |
| Integer | removeBitFromMask (mask, bit) |
| String bit | ( | ) |
Converts a bit-position into a value.
| String bitInverse | ( | ) |
Returns the ones complement of a bit.
| String bits | ( | ) |
Converts a list of bit-positions into a value.
| Float mAbs | ( | val | ) |
Use the mAbs function to get the magnitude of val.
| val | An integer or a floating-point value. |
| Float mAcos | ( | val | ) |
Use the mAcos function to get the inverse cosine of val in degrees.
| val | A value between -1.0 and 1.0 equal to the cosine of some angle theta. |
| Float mAsin | ( | val | ) |
Use the mAsin function to get the inverse sine of val in degrees.
| val | A value between -1.0 and 1.0 equal to the sine of some angle theta. |
| Float mAtan | ( | val | ) |
Use the mAtan function to get the inverse tangent of rise/run in degrees. May be called as mAtan( deltaX, deltaY ) or mAtan( "deltaX deltaY" ).
| x-axis | run Horizontal component of a line. |
| y-axis | rise Vertical component of a line. |
| Integer mCeil | ( | val | ) |
Use the mCeil function to calculate the next highest integer value from val.
| val | A floating-point value. |
| Float mClamp | ( | float | number, |
| float | min, | ||
| float | max | ||
| ) |
Clamp a value between two other values.
| number | A float value representing the number to clamp |
| min | The lower bound |
| max | The upper bound |
| Float mCos | ( | val | ) |
Use the mCos function to get the cosine of the angle val.
| val | A value in degrees. |
| Float mDegToRad | ( | val | ) |
Use the mDegToRad function to convert degrees to radians.
| val | A floating-point number representing some number of degrees. |
| String mFloatLength | ( | val | , |
| numDecimals | |||
| ) |
Use the mFloatLength function to limit the number of decimal places in val to numDecimals.
| val | A floating-point value. |
| numDecimals | An integer between 0 and inf representing the number of decimal places to allow val to have. |
| Integer mFloor | ( | val | ) |
Use the mFloor function to calculate the next lowest integer value from val.
| val | A floating-point value. |
| Float mGetMax | ( | a | , |
| b | |||
| ) |
Returns the Maximum of two values.
| Float mGetMin | ( | a | , |
| b | |||
| ) |
Returns the Minimum of two values.
| Float mLog | ( | val | ) |
Use the mLog function to calculate the natural logarithm of val.
| val | A numeric value. |
| Float mPow | ( | val | , |
| power | |||
| ) |
Use the mPow function to calculated val raised to the power of power.
| val | A numeric (integer or floating-point) value to be raised to a power. |
| power | A numeric (integer or floating-point) power to raise val to. |
| Float mRadToDeg | ( | val | ) |
Use the mRadToDeg function to convert radians to degrees.
| val | A floating-point number representing some number of radians. |
| Float mRound | ( | float | v | ) |
Rounds a number. 0.5 is rounded up.
| val | A floating-point value |
| Float mSin | ( | val | ) |
Use the mSin function to get the sine of the angle val.
| val | A value in degrees. |
| String mSolveCubic | ( | float | a, |
| float | b, | ||
| float | c, | ||
| float | d | ||
| ) |
Solve a cubic equation of form a*x^3 + b*x^2 + c*x + d = 0.
| String mSolveQuadratic | ( | float | a, |
| float | b, | ||
| float | c | ||
| ) |
Solve a quadratic equation of form a*x^2 + b*x + c = 0.
| String mSolveQuartic | ( | float | a, |
| float | b, | ||
| float | c, | ||
| float | d, | ||
| float | e | ||
| ) |
Solve a quartic equation of form a*x^4 + b*x^3 + c*x^2 + d*x + e = 0.
| Float mSqrt | ( | val | ) |
Use the mSqrt function to calculated the square root of val.
| val | A numeric value. |
| Float mTan | ( | val | ) |
Use the mTan function to get the tangent of the angle val.
| val | A value in degrees. |
1.8.10