Point Class Reference

#include <Pt/Gfx/Point.h>

Point with floating-point X and Y coordinates.

Public Member Functions

bool isOrigin () const
 Returns true if both X and Y are zero.
 
Point operator- () const
 Returns the negation of this point.
 
Float length () const
 Returns the Euclidean length of the vector from the origin.
 
Float lengthSquared () const
 Returns the squared Euclidean length; cheaper than length().
 
Point toNormalized () const
 Returns a unit-length copy of this point, or a zero point if the length is zero.
 
 Point (const PointI &pt)
 Constructs from a PointI by widening the coordinates.
 
Pointoperator= (const PointI &pt)
 Assigns from a PointI by widening the coordinates.
 
PointI round () const
 Rounds each coordinate to the nearest integer and returns a PointI.
 
PointI floor () const
 Floors each coordinate and returns a PointI.
 
PointI ceil () const
 Ceils each coordinate and returns a PointI.