Absolute value, aka modulus
Posted: 03 Nov 2012 11:19
Am I missing something or there really isn't a function that, given a number, returns the modulus of a number?
Forum for XYplorer Users and Developers
https://www.xyplorer.com/xyfc/
Ditto, man!admin wrote:Like this? http://www.php.net/manual/en/function.abs.php
Code: Select all
|a - b| < cCode: Select all
v11.70.0105 - 2012-11-03 12:04
+ Scripting got a new function.
Name: Abs
Action: Returns the absolute value of number.
Syntax: abs(number)
number: Must be a number. A string will raise an error.
Examples:
echo abs(1); // 1
echo abs(0); // 0
echo abs(-1); // 1
echo abs(-2.3456); // 2.3456