Code: Select all
clampMax(x, to) = min(x, to)
clampMin(x, to) = max(x, to)
Code: Select all
clamp(x, min=Float.MIN_VALUE, max=Float.MAX_VALUE) = clamp(x, min, max)
Code: Select all
this.x = clamp(this.x + Time.deltaTime, max=maxValue)
Code: Select all
clampMax(x, to) = min(x, to)
clampMin(x, to) = max(x, to)
Code: Select all
clamp(x, min=Float.MIN_VALUE, max=Float.MAX_VALUE) = clamp(x, min, max)
Code: Select all
this.x = clamp(this.x + Time.deltaTime, max=maxValue)