Class math
A utility class related to math operations.
Namespace: ski
Located at packages/ski.web/services/ski.service.math.php
Methods summary
public static
|
#
swap( integer/mixed & $a, integer/mixed & $b )
Swaps the values of two variables.
Swaps the values of two variables.
Parameters
- $a
integer/mixed $a
- $b
integer/mixed $b
|
public static
integer
|
#
clamp( integer $value, integer $min, integer $max )
Clamp a value between two numbers.
Clamp a value between two numbers.
Parameters
- $value
integer $value The number to clamp
- $min
integer $min The minimum the clamped number can be
- $max
integer $max The maximum the clamped number can be
Returns
integer The clamped number
|
Magic methods summary