Package-level declarations

Types

Link copied to clipboard
object Bezier2
Link copied to clipboard
abstract class Box<T : Vec<T>, U : Box<T, U>>
Link copied to clipboard
class Box2 : Box<Vec2, Box2>

Represents a two-dimensional rectangular box defined by two points: a lower-left point and an upper-right point. This class extends the generic Box class specialized for two-dimensional vectors (Vec2).

Link copied to clipboard
class Box3 : Box<Vec3, Box3>

Represents a three-dimensional axis-aligned box defined by two points in 3D space.

Link copied to clipboard
class Box4 : Box<Vec4, Box4>

Represents a four-dimensional bounding box defined by two Vec4 points. This class extends the abstract class Box, which provides common functionality for multi-dimensional bounding boxes. The box is defined by its lower and upper bounds in 4D space.

Link copied to clipboard
interface Curve2

Represents a 2D parametric curve with various geometric methods.

Link copied to clipboard
Link copied to clipboard
typealias DoublePredicate = (Double) -> Boolean
Link copied to clipboard
Link copied to clipboard
class Interval(a: Double, b: Double)

Represents a mathematical interval defined by a lower bound (lo) and an upper bound (hi). Provides various operations and utilities to manipulate and query intervals.

Link copied to clipboard
data class Line2(ax: Double, ay: Double, bx: Double, by: Double) : Curve2
Link copied to clipboard
class Matrix3
Link copied to clipboard
data class Path2(curves: Array<Curve2>, bounds: Box2, val isRing: Boolean)
Link copied to clipboard
data class Polar2(val theta: Double, val r: Double)
Link copied to clipboard
class Region2(val rings: Array<Ring2>)

Represents a 2D region composed of multiple rings, where each ring defines a contour of the region. Multiple rings can be used to create complex shapes, including those with holes.

Link copied to clipboard
class Ring2
Link copied to clipboard
interface Vec<T : Vec<T>> : Comparable<T>
Link copied to clipboard
data class Vec1(val x: Double) : Vec<Vec1>
Link copied to clipboard
data class Vec2(val x: Double, val y: Double) : Vec<Vec2>
Link copied to clipboard
data class Vec3(val x: Double, val y: Double, val z: Double) : Vec<Vec3>
Link copied to clipboard
data class Vec4(val x: Double, val y: Double, val z: Double, val w: Double) : Vec<Vec4>

Functions

Link copied to clipboard

Constructs a Path2 instance from a collection of 2D parametric curves, ensuring the curves are continuous in sequence and adjusting the bounding box and ring status accordingly.

Link copied to clipboard

Determines the sign of the given double value. Returns -1.0 if the value is negative, 1.0 if the value is positive, and the value itself if it is either 0.0 or NaN.