Main Page   Class Hierarchy   Compound List   File List   Compound Members  

Coord2D Class Reference

Two-dimensional coordinates in float space. More...

#include <mcoord.h>

List of all members.

Public Methods

 Coord2D (float x0=0, float y0=0)
 Coord2D (const Coord3D &o)
Coord2D& operator= (const Coord2D &o)
void operator+= (const Coord2D &o)
Coord2D operator+ (const Coord2D &o) const
Coord2D operator- (const Coord2D &o) const
Coord2D operator- () const
Coord2D operator * (const Coord2D &o) const
Coord2D operator * (double m) const
Coord2D operator/ (double d) const
void copy (const Coord2D &o)
void copy (const Coord3D &o)
void moveTo (float x1, float y1)
void moveBy (float x1, float y1)
void operator>> (OStream &o) const
float dist (const Coord2D &o) const
float sqdist (const Coord2D &o) const

Public Attributes

float x
float y


Detailed Description

Two-dimensional coordinates in float space.

Definition at line 22 of file mcoord.h.


Member Function Documentation

float dist ( const Coord2D & o ) const [inline]
 

Computes distance between this and the other point.

See also:
sqdist

Definition at line 47 of file mcoord.h.

float sqdist ( const Coord2D & o ) const [inline]
 

Computes squared distance between this and the other point.

(faster)

See also:
dist

Definition at line 53 of file mcoord.h.


The documentation for this class was generated from the following file:
Generated at Tue Dec 4 19:53:28 2001 for MagiC++ by doxygen1.2.6 written by Dimitri van Heesch, © 1997-2001