Source for file Vector2.php
Documentation is available at Vector2.php
// +----------------------------------------------------------------------+
// +----------------------------------------------------------------------+
// | Copyright (c) 1997-2003 The PHP Group |
// +----------------------------------------------------------------------+
// | This source file is subject to version 2.0 of the PHP license, |
// | that is bundled with this package in the file LICENSE, and is |
// | available at through the world-wide-web at |
// | http://www.php.net/license/2_02.txt. |
// | If you did not receive a copy of the PHP license and are unable to |
// | obtain it through the world-wide-web, please send a note to |
// | license@php.net so we can mail you a copy immediately. |
// +----------------------------------------------------------------------+
// | Authors: Jesus M. Castagnetto <jmcastagnetto@php.net> |
// +----------------------------------------------------------------------+
// $Id: Vector2.php 304047 2010-10-05 00:25:33Z clockwerx $
require_once "Math/Vector.php";
* Originally this class was part of NumPHP (Numeric PHP package)
* @author Jesus M. Castagnetto <jmcastagnetto@php.net>
* Constructor for Math_Vector2
* @param mixed $arg an array of values, a Math_Tuple object or a Math_Vector2 object
&& $arg->getSize () != 2 )
* Returns the X component of the vector
* Sets the X component of the vector
* @param numeric $val the value for the Y component
* @return mixed true on success, PEAR_Error object otherwise
function setX($val)/*{{{*/
return $this->set(0 , $val);
* Returns the Y component of the vector
* Sets the Y component of the vector
* @param numeric $val the value for the Y component
* @return mixed true on success, PEAR_Error object otherwise
function setY($val)/*{{{*/
return $this->set(1 , $val);
Documentation generated on Mon, 11 Mar 2019 15:39:22 -0400 by phpDocumentor 1.4.4. PEAR Logo Copyright © PHP Group 2004.
|