示例#1
0
 /**
  * This method returns the numerically lowest value.
  *
  * @access public
  * @static
  * @param IInteger\Type $x                                  the left operand
  * @param IInteger\Type $y                                  the right operand
  * @return IInteger\Type                                    the minimum value
  */
 public static function min(IInteger\Type $x, IInteger\Type $y) : IInteger\Type
 {
     return IInteger\Module::compare($x, $y)->unbox() <= 0 ? $x : $y;
 }
示例#2
0
 /**
  * This method tests the "isOdd" method.
  *
  * @dataProvider data_isOdd
  */
 public function test_isOdd(array $provided, array $expected)
 {
     $this->markTestIncomplete();
     $p0 = IInteger\Module::isOdd(IInteger\Type::box($provided[0]));
     $e0 = $expected[0];
     $this->assertInstanceOf('\\Saber\\Data\\IBool\\Type', $p0);
     $this->assertSame($e0, $p0->unbox());
 }