Point3D

@Serializable
value class Point3D(coordinates: Triple<Double, Double, Double>)

A 3D point represented as a triple of x, y, and z.

Constructors

Link copied to clipboard
constructor(coordinates: Triple<Double, Double, Double>)

Properties

Link copied to clipboard
val x: Double

The x coordinate.

Link copied to clipboard
val y: Double

The y coordinate.

Link copied to clipboard
val z: Double

The z coordinate.

Functions

Link copied to clipboard
operator fun component1(): Double

The x coordinate.

Link copied to clipboard
operator fun component2(): Double

The y coordinate.

Link copied to clipboard
operator fun component3(): Double

The z coordinate.

Link copied to clipboard

The distance from this Point3D to another Point3D.

Link copied to clipboard
operator fun div(scalar: Double): Point3D

The division of a Point3D coordinate by a scalar.

Link copied to clipboard
operator fun minus(other: Point3D): Point3D

The difference of two Point3D coordinates.

Link copied to clipboard
operator fun plus(other: Point3D): Point3D

The sum of two Point3D coordinates.

Link copied to clipboard
operator fun times(scalar: Double): Point3D

The product of a Point3D coordinate and a scalar.

Link copied to clipboard
operator fun unaryMinus(): Point3D

The negation of a Point3D coordinate.

Link copied to clipboard
operator fun unaryPlus(): Point3D

The unary plus of a Point3D coordinate.