Utilities

Interface GeoElement

Property .type : string

Method .equals (other: GeoElement, tolerance: number, oriented: boolean): boolean

Name Type Default Description
other GeoElement    
tolerance number    
oriented boolean    

Method .reflect (l: Line): GeoElement

Name Type Default Description
l Line    

Method .rotate (angle: number, center: SimplePoint): GeoElement

Name Type Default Description
angle number    
center SimplePoint    

Method .scale (sx: number, sy: number): GeoElement

Name Type Default Description
sx number    
sy number    

Method .shift (x: number, y: number): GeoElement

Name Type Default Description
x number    
y number    

Method .toString (): string

Method .transform (matrix: TransformMatrix): GeoElement

Name Type Default Description
matrix TransformMatrix    

Method .translate (p: Point): GeoElement

Name Type Default Description
p Point    

Interface GeoShape

Extends GeoElement

Method .at (t: number): Point

Name Type Default Description
t number    

Method .contains (p: Point, tolerance: number): boolean

Name Type Default Description
p Point    
tolerance number    

Method .offset (p: Point): number

Name Type Default Description
p Point    

Method .project (p: Point): Point

Name Type Default Description
p Point    

Method .reflect (l: Line): GeoShape

Name Type Default Description
l Line    

Method .rotate (angle: number, center: SimplePoint): GeoShape

Name Type Default Description
angle number    
center SimplePoint    

Method .scale (sx: number, sy: number): GeoShape

Name Type Default Description
sx number    
sy number    

Method .shift (x: number, y: number): GeoShape

Name Type Default Description
x number    
y number    

Method .translate (p: SimplePoint): GeoShape

Name Type Default Description
p SimplePoint    

Type alias SimplePoint

Type alias TransformMatrix

TWO_PI : number

Default value: ...

findClosest (p: Point, items: Array<GeoShape>): undefined|[Point, number]

Name Type Default Description
p Point    
items Array<GeoShape>    

rad (p: SimplePoint, c: SimplePoint): number

Name Type Default Description
p SimplePoint    
c SimplePoint    

Copyright © 2024 Mathigon.org