Main Page | Class List | Directories | File List | Class Members | File Members

vector2 Struct Reference

Represents a 2D vector. More...

#include <vector2.h>

List of all members.

Public Member Functions

 vector2 ()
 Constructs an uninitialized vector.
 vector2 (const component xp, const component yp)
 Constructs a vector.
void operator+= (const component c)
 Per-component addition of a scalar.
void operator+= (const vector2 &u)
 Component-wise addition.
void operator-= (const component c)
 Per-component subtraction of a scalar.
void operator-= (const vector2 &u)
 Component-wise subtraction.
void operator *= (const component c)
 Multiplication with a scalar.
void operator *= (const vector2 &u)
 Component-wise multiplication.
void operator/= (const component c)
 Division by a scalar.
void operator/= (const vector2 &u)
 Component-wise division.
 operator vertex ()
 Converts this vector to a vertex with the same coordinates.
void operator= (const vertex &v)
 Assignment operator.

Public Attributes

component x
 The x coordinate.
component y
 The y coordinate.


Detailed Description

Represents a 2D vector.


Constructor & Destructor Documentation

vector2::vector2 const component  xp,
const component  yp
[inline]
 

Constructs a vector.

Parameters:
xp the x coordinate
yp the y coordinate


The documentation for this struct was generated from the following files:
Generated on Sun Jul 10 22:32:04 2005 for S12 by  doxygen 1.4.2