Rally X
ELEN3009 Project by Justin Wernick and David Schneider
Static Public Member Functions | Private Member Functions
MazeMath Class Reference

Class of static methods for common math functions that occur in the 2D maze setting. More...

#include <MazeMath.h>

List of all members.

Static Public Member Functions

static double round (double value)
 Rounds a value to the nearest integer.
static double distance (double x1, double y1, double x2, double y2)
 Finds the straight line distance between two points on a 2D plane.

Private Member Functions

 MazeMath ()
 Unimplemented constructor.
 MazeMath (const MazeMath &ref)
 Unimplemented copy constructor.
MazeMathoperator= (const MazeMath &rhs)
 Unimplemented assignment operator.

Detailed Description

Class of static methods for common math functions that occur in the 2D maze setting.

Author:
Justin Wernick
David Schneider

Definition at line 12 of file MazeMath.h.


Constructor & Destructor Documentation

MazeMath::MazeMath ( ) [private]

Unimplemented constructor.

being a grouping of static functions, construction and destruction of MazeMath objects is unneccesary.

MazeMath::MazeMath ( const MazeMath ref) [private]

Unimplemented copy constructor.


Member Function Documentation

double MazeMath::distance ( double  x1,
double  y1,
double  x2,
double  y2 
) [static]

Finds the straight line distance between two points on a 2D plane.

Implemented using Pythagoras' Theorem.

Parameters:
[in]x1The x coordinate of the first point.
[in]y1The y coordinate of the first point.
[in]x2The x coordinate of the second point.
[in]y2The y coordinate of the second point.
Returns:
The distance between the two given points.

Definition at line 15 of file MazeMath.cpp.

MazeMath& MazeMath::operator= ( const MazeMath rhs) [private]

Unimplemented assignment operator.

double MazeMath::round ( double  value) [static]

Rounds a value to the nearest integer.

Values with a decimal fraction less than 0.5 are floored, while values with a decimal fraction greater than or eqaul to 0.5 are ceiled.

Parameters:
[in]valueThe number to be rounded off.
Returns:
The rounded off version of the given value.

Definition at line 3 of file MazeMath.cpp.


The documentation for this class was generated from the following files:
 All Classes Files Functions Variables Typedefs Enumerations Enumerator