**Category: Language-Data types**

Superclass: Object- Beginning of a Point class for simple display manipulation. Has not been exhaustively tested but appears to work for the basic primitives and for the needs of the Rectangle class.

accessing (instance)

arithmetic (instance)

comparing (instance)

converting (instance)

point functions (instance)

printing (instance)

storing (instance)

truncation and round off (instance)

Create a new point with both coordinates set to 0

**x: xInteger y: yInteger**

Create a new point with the given coordinates

Answer the x coordinate

**x: aNumber**

Set the x coordinate to aNumber

**x: anXNumber y: aYNumber**

Set the x and y coordinate to anXNumber and aYNumber, respectively

**y**

Answer the y coordinate

**y: aNumber**

Set the y coordinate to aNumber

Multiply the receiver by scale, which can be a Number or a Point

**+ delta**

Sum the receiver and delta, which can be a Number or a Point

**- delta**

Subtract delta, which can be a Number or a Point, from the receiver

**/ scale**

Divide the receiver by scale, which can be a Number or a Point, with no loss of precision

**// scale**

Divide the receiver by scale, which can be a Number or a Point, with truncation towards -infinity

**abs**

Answer a new point whose coordinates are the absolute values of the receiver's

Answer whether the receiver is higher and to the left of aPoint

**<= aPoint**

Answer whether aPoint is equal to the receiver, or the receiver is higher and to the left of aPoint

**= aPoint**

Answer whether the receiver is equal to aPoint

**> aPoint**

Answer whether the receiver is lower and to the right of aPoint

**>= aPoint**

Answer whether aPoint is equal to the receiver, or the receiver is lower and to the right of aPoint

**max: aPoint**

Answer self if it is lower and to the right of aPoint, aPoint otherwise

**min: aPoint**

Answer self if it is higher and to the left of aPoint, aPoint otherwise

Answer the receiver.

**asRectangle**

Answer an empty rectangle whose origin is self

**corner: aPoint**

Answer a Rectangle whose origin is the receiver and whose corner is aPoint

**extent: aPoint**

Answer a Rectangle whose origin is the receiver and whose extent is aPoint

**hash**

Answer an hash value for the receiver

Answer the angle (measured counterclockwise) between the receiver and a ray starting in (0, 0) and moving towards (1, 0) - i.e. 3 o'clock

**dist: aPoint**

Answer the distance between the receiver and aPoint

**dotProduct: aPoint**

Answer the dot product between the receiver and aPoint

**grid: aPoint**

Answer a new point whose coordinates are rounded towards the nearest multiple of aPoint

**normal**

Rotate the Point 90degrees clockwise and get the unit vector

**transpose**

Answer a new point whose coordinates are the receiver's coordinates exchanged (x becomes y, y becomes x)

**truncatedGrid: aPoint**

Answer a new point whose coordinates are rounded towards -infinity, to a multiple of grid (which must be a Point)

Print a representation for the receiver on aStream

Print Smalltalk code compiling to the receiver on aStream

Answer a new point whose coordinates are rounded to the nearest integer

**truncateTo: grid**

Answer a new point whose coordinates are rounded towards -infinity, to a multiple of grid (which must be a Number)