Polar:
Filter:
Classes | Math

# Polar : Number : Magnitude : Object

Polar coordinates
Source: Polar.sc

## Description

Represents polar coordinates.

## Class Methods

### Polar.new(rho, theta)

Create a new polar coordinate with the given radius, rho, and angle in radians, theta.

## Instance Methods

### /(aNumber)

The math operations of addition, subtraction, multiplication and division are accomplished by first converting to complex numbers.

### .scale(scale)

Scale the radius by some value.

### .rotate(angle)

Rotate the angle by some value.

Rotate by pi.

### .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

Convert to Complex

Convert to Point

### .asSpherical

Convert to Spherical

### .asCartesian

Convert to Cartesian

[ theta, 0 ]

[ theta, 0 ]

### .rho = value

Get or set the rho coordinate value.

### .theta = value

Get or set the theta coordinate value.

### .hash

Returns a hash value for the receiver.