Companion

object Companion

Deprecated

Properties

Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
val One: MPoint
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
val Up: MPoint
Link copied to clipboard

Functions

Link copied to clipboard
fun angle(ax: Double, ay: Double, bx: Double, by: Double): Angle
fun angle(x1: Double, y1: Double, x2: Double, y2: Double, x3: Double, y3: Double): Angle
Link copied to clipboard
fun angleArc(a: Point, b: Point): Angle
Link copied to clipboard
Link copied to clipboard
fun compare(l: MPoint, r: MPoint): Int
fun compare(lx: Double, ly: Double, rx: Double, ry: Double): Int
Link copied to clipboard
fun crossProduct(ax: Double, ay: Double, bx: Double, by: Double): Double
Link copied to clipboard
fun direction(a: MPoint, b: MPoint, out: MPoint = MPoint()): MPoint
Link copied to clipboard
fun distance(x1: Double, y1: Double, x2: Double, y2: Double): Double
fun distance(x1: Float, y1: Float, x2: Float, y2: Float): Double
fun distance(x1: Int, y1: Int, x2: Int, y2: Int): Double
Link copied to clipboard
Link copied to clipboard
fun dot(a: MPoint, b: MPoint): Double
fun dot(aX: Double, aY: Double, bX: Double, bY: Double): Double
Link copied to clipboard
fun fromPolar(angle: Angle, length: Double = 1.0, out: MPoint = MPoint()): MPoint
fun fromPolar(base: MPoint, angle: Angle, length: Double = 1.0, out: MPoint = MPoint()): MPoint

fun fromPolar(x: Double, y: Double, angle: Angle, length: Double = 1.0, out: MPoint = MPoint()): MPoint

Constructs a point from polar coordinates determined by an angle and a length. Angle 0 is pointing to the right, and the direction is counter-clock-wise

Link copied to clipboard
operator fun invoke(): MPoint
operator fun invoke(v: MPoint): MPoint
operator fun invoke(xy: Double): MPoint
operator fun invoke(xy: Float): MPoint
operator fun invoke(xy: Int): MPoint
operator fun invoke(x: Double, y: Double): MPoint
operator fun invoke(x: Float, y: Float): MPoint
operator fun invoke(x: Int, y: Int): MPoint
inline operator fun invoke(x: Number, y: Number): MPoint

inline operator fun invoke(angle: Angle, length: Double = 1.0): MPoint

Constructs a point from polar coordinates determined by an angle and a length. Angle 0 is pointing to the right, and the direction is counter-clock-wise

Link copied to clipboard
fun isCollinear(xa: Double, ya: Double, x: Double, y: Double, xb: Double, yb: Double): Boolean
fun isCollinear(xa: Int, ya: Int, x: Int, y: Int, xb: Int, yb: Int): Boolean
Link copied to clipboard
fun middle(a: MPoint, b: MPoint): MPoint
fun middle(a: MPoint, b: MPoint, out: MPoint = MPoint()): MPoint
Link copied to clipboard
fun orientation(p1: MPoint, p2: MPoint, p3: MPoint): Double

< 0 left, 0 right, 0 collinear

fun orientation(ax: Double, ay: Double, bx: Double, by: Double, cx: Double, cy: Double): Double