Point:
Filter:
Classes | Geometry

# Point : Object

Cartesian point
Source: Point.sc
Subclasses: PointArray

## Description

Defines a point on the Cartesian plane.

## Class Methods

### Point.new(x: 0, y: 0)

Defines a new point.

## Instance Methods

### .x = value

Get or set the x coordinate value.

### .y = value

Get or set the y coordinate value.

### .set(argX: 0, argY: 0)

Sets the point x and y values.

### .hash

Returns a hash value for the receiver.

Subtraction.

Multiplication.

Division.

### .scale(scale)

Multiplication by a Point.

### .abs

Absolute value of the point.

### .theta = theta: 0

Return the polar coordinate angle of the receiver.

### .dist(aPoint)

Return the distance from the receiver to aPoint.

### .transpose

Return a Point whose x and y coordinates are swapped.

### .round(quant)

Round the coordinate values to a multiple of quantum.

### .trunc(quant)

Truncate the coordinate values to a multiple of quantum.

### .angle = angle: 0

Return the polar coordinate angle of the receiver.

### .angles

Return the spherical coordinate azimuth and elevation angles of the receiver.

### .mirrorX

Mirror x, reflecting across Y axis.

### .mirrorY

Mirror y, reflecting across the X axis.

### .mirrorO

Mirror across the origin.

#### Discussion:

A synonym for neg.

### .asComplex

Returns a complex number with x as the real part and y as the imaginary part.

### .asString(limit: 512)

From superclass: Object

Return a string representing the receiver.

### .phi

Return the spherical coordinate elevation angle of the receiver.

0

### .asCartesian

Convert to Cartesian, with z = 0.

### @(aValue)

If aValue is Number, create a new Cartesian whose x coordinate is this.x, y coordinate is this.y and whose z coordinate is aValue. If aValue is a Point, create a new Rect.

 aValue