Imprudence:Build Math Expressions

Build Math Expressions are a feature available beginning in Imprudence 1.1.0, developed by Aimee Trescothick. They allow builders to perform simple math operations within the number input fields in the Build floater's Object and Texture tabs.

To use a build math expression, type in the expression into an input field and press Enter. The expression will be evaluated, and the result used for the new value of that field.

Available Variables, Constants, and Operators
Note: Variable, constant, and function names are case-insensitive. I.e. "PX", "px", "pX", and "Px" are all valid and mean the same thing.

Variables
Object:


 * PX, PY, PZ: X, Y, and Z Position
 * SX, SY, SZ: X, Y, and Z Size
 * RX, RY, RZ: X, Y, and Z Rotation
 * CB, CE: Path Cut Begin and End
 * HLW: Hollow
 * SKW: Skew
 * PB, PE: Profile Cut (aka Slice, Dimple) Begin and End
 * TB, TE: Twist Begin and End
 * SHX, SHY: X and Y Shear
 * HLX, HLY: X and Y Hole Size
 * TPX, TPY: X and Y Taper
 * ROF: Radius Offset
 * REV: Revolutions

Texture:


 * TSU, TSV: U and V Texture Repeats per face
 * TOU, TOV: U and V Texture Offset
 * TRNS: Transparency
 * TROT: Texture rotation
 * GLOW: Glow

Constants

 * PI: &pi; (3.14159...)
 * TWO_PI: 2&pi; (6.28319...)
 * PI_BY_TWO: &pi;/2 (1.57080...)
 * SQRT2: Square root of 2 (1.41421...)
 * DEG_TO_RAD: &pi;/180 (0.01745...)
 * RAD_TO_DEG: 180/&pi; (57.29578...)
 * GRAVITY: -9.8

Operators

 * +: Addition
 * -: Subtraction
 * *: Multiplication
 * /: Division
 * : Grouping

New Operators in 1.3
In Imprudence 1.3.0 and later, you can use the following mathematical functions in build expressions:


 * SIN(theta): Sine
 * ASIN(theta): Arcsine (inverse sine)
 * COS(theta): Cosine
 * ACOS(theta): Arccosine (inverse cosine)
 * TAN(theta): Tangent
 * ATAN(theta): Arctangent (inverse tangent)
 * ATAN2(y,x): Atan2
 * SQRT(x): Square root
 * LOG(x): Natural logarithm (log&#8495;x)
 * EXP(x): Natural exponent (&#8495;x)
 * ABS(x): Absolute value
 * MIN(a,b): Minimum (smaller) of the two values
 * MAX(a,b): Maximum (greater) of the two values