API reference
Every public class, method, and event in @codexo/exojs. Generated from source.
classLineSegment
@codexo/exojs-particles / particles / stable
Random point on a line segment between `(x0, y0)` and `(x1, y1)`. Uniform parameter distribution: `t = Math.random()` then `lerp(start, end, t)`.
4
props
1
methods
0
events
Import
import { LineSegment } from '@codexo/exojs-particles'Random point on a line segment between `(x0, y0)` and `(x1, y1)`. Uniform parameter distribution: `t = Math.random()` then `lerp(start, end, t)`.
Constructors1
new(x0: number, y0: number, x1: number, y1: number): LineSegmentMethods1
sample(out: VectorConcrete mutable 2D vector with full AbstractVector arithmetic and Collidable collision support (treated as a point collider). `Vector.temp` provides a shared…): VectorConcrete mutable 2D vector with full AbstractVector arithmetic and Collidable collision support (treated as a point collider). `Vector.temp` provides a shared…Properties4
x0: numberx1: numbery0: numbery1: numberSource