On this page
math.pow
Raises base to the specified power.
Syntax
Atlas Script
math.pow(base, power)Parameters
base- Base value raised by this math operation.
power- Exponent applied by this math operation.
Return value
See the remarks for the returned value and runtime behavior.
Remarks
Raises base to the specified power.
Examples
Curve trigger pressure.atlas
event on_input() {
var sourcePressure = input.get(ps5.l2);
if (sourcePressure > 0) {
var curved = math.pow(sourcePressure / 100, 2) * 100;
output.set_trigger("R2", math.clamp(curved, 0, 100));
}
}