fixed range for mysql and php compatability
[openemr.git] / library / classes / ClinicalTypes / Range.php
blobb2d41532293251b233be971ea438f1ebc0838a33
1 <?php
2 // Copyright (C) 2011 Ken Chapple <ken@mi-squared.com>
3 //
4 // This program is free software; you can redistribute it and/or
5 // modify it under the terms of the GNU General Public License
6 // as published by the Free Software Foundation; either version 2
7 // of the License, or (at your option) any later version.
8 //
9 class Range
11 const NEG_INF = -999999;
12 const POS_INF = 999999;
14 public $lowerBound;
15 public $upperBound;
17 public function __construct( $lowerBound, $upperBound )
19 $this->lowerBound = $lowerBound;
20 $this->upperBound = $upperBound;
23 public function test( $val )
25 if ( $val > $this->lowerBound &&
26 $val < $this->upperBound ) {
27 return true;
30 return false;