Transform Reference

Numeric Verbs

Arithmetic operations, rounding, formatting, and mathematical functions.

VerbSyntaxDescriptionTry It
formatNumber%formatNumber @path decimalsFormat with decimal places Try
formatInteger%formatInteger @pathFormat as integer Try
formatCurrency%formatCurrency @pathFormat as currency (2 decimals) Try
formatPercent%formatPercent @path decimalsFormat as percentage Try
abs%abs @pathAbsolute value Try
round%round @path decimalsRound to decimal places Try
floor%floor @pathRound down Try
ceil%ceil @pathRound up Try
multiply%multiply @a @bMultiply two values Try
divide%divide @a @bDivide a by b Try
add%add @a @bAdd two values Try
subtract%subtract @a @bSubtract b from a Try
mod%mod @a @bModulo (remainder) Try
negate%negate @pathFlip sign Try
convertUnit%convertUnit @value "from" "to"Convert between compatible units (mass, length, temp, volume, speed, area, data, time) Try

Reference

Conversion Units (convertUnit) — Supported Families

Units must belong to the same family. Cross-family conversions (e.g. "kg" to "m") return null. Results are rounded to 6 decimal places.

FamilyUnitsBase Unit
Massg, kg, mg, lb, oz, ton, tonneg
Lengthm, km, cm, mm, mi, yd, ft, inm
Volumel, ml, gal, qt, pt, cup, flozl
Speedm/s, km/h, mph, knot, ft/sm/s
Aream2, km2, cm2, ha, acre, ft2, in2, mi2m2
DataB, KB, MB, GB, TBB
Times, ms, min, h, d, wks
TemperatureC, F, Kformula-based

Note: Temperature uses formula conversion (not ratio-based). Data units use binary prefixes (1 KB = 1024 B).

Examples

Numeric verb examples
; Formatting
premium = %formatNumber @premium ##2                 ; 1234.5 -> "1234.50"
year = %formatInteger @vehicle.year                  ; 2024.0 -> "2024"

; Arithmetic
surcharge = %multiply @base_premium #1.15            ; 100 -> 115 (15%)
monthly = %divide @annual_premium ##12               ; 1200 -> 100
total = %add @base @surcharges                       ; 500 + 75 -> 575

; Unit conversion
weight_lb = %convertUnit @weight_kg "kg" "lb"        ; 100 -> 220.462
temp_f = %convertUnit @temp_c "C" "F"                ; 100 -> 212