#include <Point.h>
Public Member Functions | |
| BPoint () | |
| BPoint (float X, float Y) | |
| BPoint (const BPoint &pt) | |
| BPoint & | operator= (const BPoint &from) |
| void | Set (float X, float Y) |
| void | ConstrainTo (BRect rect) |
| void | PrintToStream () const |
| BPoint | operator- () const |
| BPoint | operator+ (const BPoint &) const |
| BPoint | operator- (const BPoint &) const |
| BPoint & | operator+= (const BPoint &) |
| BPoint & | operator-= (const BPoint &) |
| BPoint | operator * (const float f) const |
| BPoint | operator/ (const float f) const |
| BPoint & | operator *= (const float f) |
| BPoint & | operator/= (const float f) |
| bool | operator!= (const BPoint &) const |
| bool | operator== (const BPoint &) const |
Public Attributes | |
| float | x |
| float | y |
|
|
|
|
||||||||||||
|
|
|
|
|
|
|
Ensures that the BPoint lies within rect. If it's already contained in the rectangle, the BPoint is unchanged; otherwise, it's moved to the rect's nearest edge.
|
|
|
|
|
|
|
|
|
Inequality operator.
|
|
|
Addition operator. Creates and returns a new BPoint that adds the two operands together. The new object's x coordinate is the sum of the operands' x values; its y value is the sum of the operands' y values.
|
|
|
Addition and assignment operator Adds the operands together and stores the result in the left operand.
|
|
|
Subtraction operator. Creates and returns a new BPoint that subtracts the right operand from the left. The new object's x coordinate is the difference between the operands' x values; its y value is the difference between the operands' y values.
|
|
|
|
|
|
Subtraction and assignment operator Performs the subtraction and stores the result in the left operand.
|
|
|
|
|
|
|
|
|
|
|
|
Equality operator.
|
|
|
Prints the BPoint's coordinates to standard output in the form:
|
|
||||||||||||
|
|
|
|
|
|
|
|