Angle

Class Angle

A 2-dimensional angle class, defined by three points.

Implements GeoShape

constructor (a: Point, b: Point, c: Point): Angle

Name Type Default Description
a Point    
b Point    
c Point    

readonly Property .a : Point

readonly Property .b : Point

readonly Property .c : Point

readonly Property .type

Default value: 'angle'

Accessor .arc : Arc

Returns the Arc element corresponding to this angle.

Accessor .bisector

The bisector of this angle.

Accessor .deg : number

The size, in degrees, of this angle.

Accessor .isRight : boolean

Checks if this angle is right-angled.

Accessor .rad : number

The size, in radians, of this angle.

Accessor .radius : number

Radius of the arc or sector representing this angle.

Accessor .sup : Angle

Returns the smaller one of this and its supplementary angle.

Method .at (): Point

Method .contains (p: Point): boolean

Name Type Default Description
p Point    

Method .equals (a: Angle, precision: number): boolean

Name Type Default Description
a Angle    
precision number    

Method .offset (): number

Method .project (p: Point): Point

Name Type Default Description
p Point    

Method .reflect (l: Line): Angle

Name Type Default Description
l Line    

Method .rotate (a: number, c: SimplePoint): Angle

Name Type Default Description
a number    
c SimplePoint    

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

Name Type Default Description
sx number    
sy number  

Method .shape (filled: boolean, radius: number, round: boolean): Arc|Polygon

Shape object that can be used to draw this angle.

Name Type Default Description
filled boolean true  
radius number    
round boolean    

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

Name Type Default Description
x number    
y number  

Method .toString (): string

Method .transform (m: TransformMatrix): Angle

Name Type Default Description
m TransformMatrix    

Method .translate (p: SimplePoint): Angle

Name Type Default Description
p SimplePoint    

static Method .equals (a: Angle, b: Angle, precision: number): boolean

Checks if a and b are roughly equivalent (by default, within one degree of eachother)

Name Type Default Description
a Angle    
b Angle    
precision number  

static Method .fromDegrees (val: number): Angle

Name Type Default Description
val number    

static Method .fromRadians (val: number): Angle

Name Type Default Description
val number    

toDeg (n: number): number

Convert angles in radians to degrees.

Name Type Default Description
n number    

toRad (n: number): number

Convert angles in degrees to radians.

Name Type Default Description
n number    

Copyright © 2024 Mathigon.org