A customized point to be used in the engine, this SPoint is a 2 dimensional point with several functions/utility added.


void AddTo(SPoint p, double scl): Adds the values of p to this point, multiplies by scl. Useful for adding vectors
double SPoint::SqDistFromOrigin() : returns the magnitude of the vector squared. Returning the squared value is faster than taking the root.
double SPoint::GetDir() obtains the angle from the vector represented by x and y