API reference
Every public class, method, and event in @codexo/exojs. Generated from source.
classSegment
@codexo/exojs / math / stable
Mutable line segment defined by start and end Vectors. Unlike Line this type does not implement ShapeLike — it is a lightweight value type used in path and swept-collision utilities. `Segment.temp` is a shared scratch instance.
7
props
5
methods
0
events
Import
import { Segment } from '@codexo/exojs' Mutable line segment defined by start and end Vectors. Unlike Line this type does not implement ShapeLike — it is a lightweight value type used in path and swept-collision utilities.
`Segment.temp` is a shared scratch instance.
Constructors 1
new(startX: number, startY: number, endX: number, endY: number): Segment Methods 5
clone(): this copy(segment: Segment): this destroy(): void equals(__namedParameters: Partial<Segment>): boolean set(startX: number, startY: number, endX: number, endY: number): this Properties 7
endPoint: Vector endX: number endY: number startPoint: Vector startX: number startY: number temp: Segment Source