Options
All
  • Public
  • Public/Protected
  • All
Menu

Module Vec2

2-tuple representing a vector in screen space

Index

Functions

Functions

Add

Dot

  • Dot(lhs: Readonly<Vec2>, rhs: Readonly<Vec2>): number

Magnitude

  • Magnitude(vec: Readonly<Vec2>): number

Norm

  • Norm(vec: Readonly<Vec2>): number
  • Compute the L1-Norm (sum of absolute values of the components) of a Vec2

    L1-Norm is also called the "Manhattan norm," after Manhattan geometry.

    Parameters

    • vec: Readonly<Vec2>

    Returns number

    The scalar L1-norm of vec

Sub

Generated using TypeDoc