Пример #1
0
 /**
  * Divides the Float by the passed one.
  *
  * @param \AppserverIo\Lang\Flt $dividyBy The Float to dividy by
  *
  * @return \AppserverIo\Lang\Flt The instance
  */
 public function divide(Flt $dividyBy)
 {
     $this->value = $this->value / $dividyBy->floatValue();
     return $this;
 }
Пример #2
0
 /**
  * This test checks the Flt's divide() method
  * with an odd result.
  *
  * @return void
  */
 public function testDivideToOddNumber()
 {
     // initialize a new Float instance
     $float = new Flt(11.0);
     $float->divide(new Flt(3.0));
     // check the value
     $this->assertEquals(11.0 / 3.0, $float->floatValue());
 }