Polar

@Serializable
data class Polar(val theta: Double, val radius: Double = 1.0) : LinearType<Polar> (source)

A 2D point defined in the Polar coordinate system.

Parameters

theta

The angle in degrees.

Constructors

Link copied to clipboard
constructor(theta: Double, radius: Double = 1.0)

Types

Link copied to clipboard
object Companion

Properties

Link copied to clipboard

Constructs equivalent Cartesian coordinates from the polar representation.

Link copied to clipboard
Link copied to clipboard

Functions

Link copied to clipboard
open operator override fun div(scale: Double): Polar

Divides the current object by the given scale factor.

Link copied to clipboard

make a safe version by bringing theta between 0 and 360

Link copied to clipboard
open operator override fun minus(right: Polar): Polar

Subtracts the specified value from the current value.

Link copied to clipboard
open operator override fun plus(right: Polar): Polar

Adds the given value right to this value and returns the result.

Link copied to clipboard
open operator override fun times(scale: Double): Polar

Multiplies the current instance by the specified scalar value.

operator fun times(scale: Polar): Polar