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
val radius: Double = 1.0
Link copied to clipboard

Functions

Link copied to clipboard
open operator override fun div(scale: Double): Polar
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
Link copied to clipboard
open operator override fun plus(right: Polar): Polar
Link copied to clipboard
open operator override fun times(scale: Double): Polar
operator fun times(scale: Polar): Polar