Esempio n. 1
0
 /**
  * construct a vector from this point instance.
  */
 public function getVector()
 {
     $vector = new Vector();
     $vector->x($this->x());
     $vector->y($this->y());
     $vector->z($this->z());
     return $vector;
 }
Esempio n. 2
0
 public static function det(Vector $u, Vector $v, Vector $w)
 {
     return $u->x() * $v->y() * $w->z() + $u->y() * $v->z() * $w->x() + $u->z() * $v->x() * $w->y() - $u->z() * $v->y() * $w->x() - $u->y() * $v->x() * $w->z() - $u->x() * $v->z() * $w->y();
 }