Options
All
  • Public
  • Public/Protected
  • All
Menu

Class Vector2f

Class is used for holding 2 numeric values and manipulation with them

Hierarchy

  • Vector2f

Index

Constructors

Properties

Methods

Constructors

constructor

  • new Vector2f(x: number, y: number): Vector2f

Properties

x

x: number = 0

the Y value of vector

y

y: number = 0

the X value of vector

Methods

add

  • Function add values into current values and return object itself

    Parameters

    • arg1: number | Vector2f

      parameter can by Vector2f or number representing x if arg2 is passed otherwise x and y

    • Optional arg2: number

      is y value for vector

    Returns Vector2f

    updated Vector2f

div

mul

set

sub

  • Function subtract values from current values and return object itself

    Parameters

    • arg1: number | Vector2f

      parameter can by Vector2f or number representing x if arg2 is passed otherwise x and y

    • Optional arg2: number

      is y value for vector

    Returns Vector2f

    updated Vector2f

Generated using TypeDoc