예제 #1
0
파일: Flt.php 프로젝트: appserver-io/lang
 /**
  * Multiplies the Float with the passed one.
  *
  * @param \AppserverIo\Lang\Flt $toMultiply The Float to multiply
  *
  * @return \AppserverIo\Lang\Flt The instance
  */
 public function multiply(Flt $toMultiply)
 {
     $this->value *= $toMultiply->intValue();
     return $this;
 }
예제 #2
0
 /**
  * This test checks the Flt's subtract() method.
  *
  * @return void
  */
 public function testSubtract()
 {
     // initialize a new Flt instance
     $float = new Flt(10.6);
     $float->subtract(new Flt(32.6));
     // check the value
     $this->assertEquals(-22, $float->intValue());
 }