Absolute value, aka modulus
-
Marco
- Posts: 2354
- Joined: 27 Jun 2011 15:20
Absolute value, aka modulus
Am I missing something or there really isn't a function that, given a number, returns the modulus of a number?
Tag Backup - SimpleUpdater - XYplorer Messenger - The Unofficial XYplorer Archive - Everything in XYplorer
Don sees all [cit. from viewtopic.php?p=124094#p124094]
Don sees all [cit. from viewtopic.php?p=124094#p124094]
-
admin
- Site Admin
- Posts: 67269
- Joined: 22 May 2004 16:48
- Location: Win8.1, Win10, Win11, all @100%
- Contact:
-
Marco
- Posts: 2354
- Joined: 27 Jun 2011 15:20
Re: Absolute value, aka modulus
Ditto, man!admin wrote:Like this? http://www.php.net/manual/en/function.abs.php
My scenario would be
Code: Select all
|a - b| < cEDIT:
Code: 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.3456Tag Backup - SimpleUpdater - XYplorer Messenger - The Unofficial XYplorer Archive - Everything in XYplorer
Don sees all [cit. from viewtopic.php?p=124094#p124094]
Don sees all [cit. from viewtopic.php?p=124094#p124094]
XYplorer Beta Club