예제 #1
0
 public function testUnitClamp()
 {
     $this->assertTrue(CMathf::unitClamp(1.1) === 1.0);
     $this->assertTrue(CMathf::unitClamp(-0.2) === 0.0);
     $this->assertTrue(CMathf::unitClamp(0.5) === 0.5);
     $this->assertTrue(CMathf::unitClamp(1) === 1.0);
     $this->assertTrue(CMathf::unitClamp(0) === 0.0);
 }