Exemple #1
0
 /**
  * Constructor for Math_Vector3
  *
  * @access  public
  * @param   mixed   $arg    an array of values, a Math_Tuple object or a Math_Vector3 object
  */
 public function __construct($arg)
 {
     if (is_array($arg) && count($arg) != 3) {
         $this->tuple = null;
     } elseif (is_object($arg) && (strtolower(get_class($arg)) != "math_vector3" && strtolower(get_class($arg)) != "math_tuple")) {
         $this->tuple = null;
     } elseif (is_object($arg) && strtolower(get_class($arg)) == "math_tuple" && $arg->getSize() != 3) {
         $this->tuple = null;
     } else {
         parent::__construct($arg);
     }
 }