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.

Inherited class methods

Instance Methods

Math

+(aNumber)

-(aNumber)

*(aNumber)

/(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.

.neg

Rotate by pi.

Conversion

.magnitude

Answer the radius.

.angle

Answer the angle in radians

.phase

Answer the angle in radians

.real

Answer the real part.

.imag

Answer the imaginary part.

.asComplex

Convert to Complex

.asPoint

Convert to Point

Inherited instance methods

Undocumented instance methods

==(aPolar)

.asPolar

.hash

.performBinaryOpOnSomething(aSelector, thing, adverb)

.performBinaryOpOnUGen(aSelector, aUGen)

.rho

.rho = value

.theta

.theta = value