public function testAdd() { $vec = new CVector(1, 1, 1); $vec2 = new CVector(5, 6, 7); $ret = $vec->add($vec2); $this->assertEquals(6, $ret->x); $this->assertEquals(7, $ret->y); $this->assertEquals(8, $ret->z); }
/** * @param CVector $pos * * @return float */ public function eval_(CVector $pos) { return $this->abs + $this->rand * $this->noise($pos->mul($this->frequency)); }