Пример #1
0
 /**
  * Answer a new object with the value zero
  * 
  * @param optional string $class The class to instantiate. Do NOT use outside 
  *		of this package.
  * @return object ByteSize
  * @access public
  * @static
  * @since 7/14/05
  */
 static function zero($class = 'ByteSize')
 {
     return parent::zero($class);
 }
Пример #2
0
 /**
  * Answer the integer nearest the receiver toward negative infinity.
  * 
  * @return object Number
  * @access public
  * @since 7/14/05
  */
 function floor()
 {
     $truncation = $this->truncated();
     if ($this->isGreaterThanOrEqualTo(Integer::zero())) {
         return $truncation;
     } else {
         if ($this->isEqualTo($truncation)) {
             return $truncation;
         } else {
             return $truncation->minus(Integer::withValue(1));
         }
     }
 }