$max
$max : integer
The maximum of the range
Range - Defines A Range of Values
A range is a predicate that checks if a value is between a minimum and a maximum
CHANGELOG
1.0: Created Range - May 20th, 2013 2.0: Refactored and re-formatted for inclusion in primus - April 11th, 2015 3.0: formatted for inclusion in phabstractic - July 7th, 2016 (exchanged construction arguments)
__construct(integer $min, integer $max)
The Range Constructor
Takes a maximum, and a minimum, if an argument is missing, defaults to 0
integer | $min | Minimum range value |
integer | $max | Maximum range value |
if Max and Min are backwards, or are not integers
isInRange(integer $x, array $include = array()) : boolean
Checks to see if an integer is in range.
include array - minimum => true if minimum included maximum => true if maximum included
integer | $x | The integer to check |
array | $include | Whether to include the maximum or minimum |
Is x in range?