Options
All
  • Public
  • Public/Protected
  • All
Menu

Index

Functions

  • create(x?: number, y?: number): Point
  • fromJson(json: string): Point
  • Parses a JSON string representation of a Point and returns an object.

    Parameters

    • json: string

      A JSON string, either in the form [x,y] or {"x": 0, "y": 0}

    Returns Point

    A parsed Point.

  • Performs a linear interpolation between a and b and returns the result. The value of t is clamped between [0, 1].

    Parameters

    • a: Point

      The start value.

    • b: Point

      The end value.

    • t: number

      A value between 0 and 1.

    Returns Point

    A point between a and b.

  • magnitude(pt: Point): number
  • polar(length: number, radians: number): Point
  • scale(pt: Point, scaleX: number, scaleY: number): Point
  • scaleProportional(pt: Point, scale: number): Point