38 - 1024 * 1024 * 1024);
43 const double s = sin(rad);
44 const double c = cos(rad);
47 p.
x() * c - p.
y() * s,
48 p.
x() * s + p.
y() * c) + origin;
double roundDecimalToEven(double x, int precision)
round to the given number of decimal digits (bankers rounding)
A point in 2D or 3D with translation and scaling methods.
Position()
default constructor
static const Position INVALID
used to indicate that a position is valid
double x() const
Returns the x-position.
double myZ
The z-position.
void round(int precision)
round all coordinates to the given precision
double myY
The y-position.
Position rotateAround2D(double rad, const Position &origin)
rotate this position by rad around origin and return the result
double myX
The x-position.
double y() const
Returns the y-position.