コード例 #1
0
ファイル: CVectorTest.php プロジェクト: nimetu/ryzom_weather
 public function testMul()
 {
     $vec = new CVector(1, 2, 3);
     $vec->mul(2);
     $this->assertEquals(2, $vec->x);
     $this->assertEquals(4, $vec->y);
     $this->assertEquals(6, $vec->z);
 }
コード例 #2
0
ファイル: CNoiseValue.php プロジェクト: nimetu/ryzom_weather
 /**
  * @param CVector $pos
  *
  * @return float
  */
 public function eval_(CVector $pos)
 {
     return $this->abs + $this->rand * $this->noise($pos->mul($this->frequency));
 }