Skip to main content
Module

x/gmath/mod.ts>Angle

🎮 A wasm accelerated game and graphics maths library for deno
Latest
class Angle
Re-export
Abstract
import { Angle } from "https://deno.land/x/gmath@0.1.12/mod.ts";

Constructors

new
Angle(value?)

Properties

value: number

Methods

abstract
acos(): number

The arccosine of the Angle

abstract
add(other: Angle | number): Angle

Adds this Angle to another

abstract
asin(): number

The arcsine of the Angle

abstract
atan(): number

The arctangent of the Angle

abstract
cos(): number

The cosine of the Angle

abstract
cot(): number

The cotangent of the Angle

abstract
csc(): number

The cosecant of the Angle

abstract
div(other: Angle | number): Angle

Divides this Angle to another

abstract
eq(other: Angle | number): boolean

Checks if the angles are equal

abstract
mul(other: Angle | number): Angle

Multiplies this Angle to another

abstract
neg(): Angle

Negates this Angle

abstract
normal(): Angle

Returns a new Angle normalized to to a range of 0 to a full turn

abstract
normalize(): Angle

Normalizes this Angle to a range of 0 to a full turn

abstract
sec(): number

The secant of the Angle

abstract
sin(): number

The sine of the Angle

abstract
sincos(): [number, number]

Both the sine and cosine of the Angle

abstract
sub(other: Angle | number): Angle

Subtracts this Angle to another

abstract
tan(): number

The tangent of the Angle

abstract
toDeg(): Deg

Converts this Angle to a Deg

abstract
toRad(): Rad

Converts this Angle to a Rad

abstract
toString(): string

Converts this Angle to its string representation

Static Properties

turn: number