Options
All
  • Public
  • Public/Protected
  • All
Menu

Class Vector

Hierarchy

  • Vector

Index

Constructors

constructor

  • Parameters

    Returns Vector

  • Parameters

    • Optional x: number
    • Optional y: number

    Returns Vector

Properties

x

x: number

y

y: number

Methods

add

  • Parameters

    Returns Vector

  • Parameters

    • x: number
    • y: number

    Returns Vector

copy

  • Returns Vector

dist

  • dist(vec: Vector): number
  • dist(x: number, y: number): number
  • Parameters

    Returns number

  • Parameters

    • x: number
    • y: number

    Returns number

dot

  • dot(vec: Vector): number
  • dot(x: number, y: number): number
  • Parameters

    Returns number

  • Parameters

    • x: number
    • y: number

    Returns number

equals

  • equals(vec: Vector): boolean
  • equals(x: number, y: number): boolean
  • Parameters

    Returns boolean

  • Parameters

    • x: number
    • y: number

    Returns boolean

len

  • len(): number
  • Returns number

lenSqr

  • lenSqr(): number
  • Returns number

lerp

  • lerp(vec: Vector, percent?: number): Vector
  • lerp(x: number, y: number, percent?: number): Vector
  • Parameters

    • vec: Vector
    • Optional percent: number

    Returns Vector

  • Parameters

    • x: number
    • y: number
    • Optional percent: number

    Returns Vector

nlerp

  • nlerp(vec: Vector, percent?: number): Vector
  • nlerp(x: number, y: number, percent?: number): Vector
  • Parameters

    • vec: Vector
    • Optional percent: number

    Returns Vector

  • Parameters

    • x: number
    • y: number
    • Optional percent: number

    Returns Vector

normalize

  • Returns Vector

scale

  • Parameters

    • n: number

    Returns Vector

sub

  • Parameters

    Returns Vector

  • Parameters

    • x: number
    • y: number

    Returns Vector

Generated using TypeDoc