BGE/Math/VectorOps

Alias: BGE.Math.VectorOps


Static Methods

create(x?: float, y?: float, z?: dynamic): BGE.Math.Vector

static

Parameters

  • x (float, optional, default: "0.0")
  • y (float, optional, default: "0.0")
  • z (dynamic, optional, default: "0.0")

Returns

  • BGE.Math.Vector

setFrom(a: BGE.Math.Vector, b: BGE.Math.Vector): BGE.Math.Vector

static

Parameters

  • a (BGE.Math.Vector)
  • b (BGE.Math.Vector)

Returns

  • BGE.Math.Vector

add(a: BGE.Math.Vector, b: BGE.Math.Vector): BGE.Math.Vector

static

Parameters

  • a (BGE.Math.Vector)
  • b (BGE.Math.Vector)

Returns

  • BGE.Math.Vector

equals(a: BGE.Math.Vector, b: BGE.Math.Vector): boolean

static

Parameters

  • a (BGE.Math.Vector)
  • b (BGE.Math.Vector)

Returns

  • boolean

plusEquals(a: BGE.Math.Vector, v: BGE.Math.Vector): void

static

Parameters

  • a (BGE.Math.Vector)
  • v (BGE.Math.Vector)

Returns

  • void

subtract( a: BGE.Math.Vector, v: BGE.Math.Vector, ): BGE.Math.Vector

static

Parameters

  • a (BGE.Math.Vector)
  • v (BGE.Math.Vector)

Returns

  • BGE.Math.Vector

minusEquals(a: BGE.Math.Vector, v: BGE.Math.Vector): void

static

Parameters

  • a (BGE.Math.Vector)
  • v (BGE.Math.Vector)

Returns

  • void

negative(a: BGE.Math.Vector): BGE.Math.Vector

static

Parameters

  • a (BGE.Math.Vector)

Returns

  • BGE.Math.Vector

flipX(a: BGE.Math.Vector): BGE.Math.Vector

static

Parameters

  • a (BGE.Math.Vector)

Returns

  • BGE.Math.Vector

flipY(a: BGE.Math.Vector): BGE.Math.Vector

static

Parameters

  • a (BGE.Math.Vector)

Returns

  • BGE.Math.Vector

scale(v: BGE.Math.Vector, r: float): BGE.Math.Vector

static

Parameters

  • v (BGE.Math.Vector)
  • r (float)

Returns

  • BGE.Math.Vector

scaleEquals(v: BGE.Math.Vector, r: float): void

static

Parameters

  • v (BGE.Math.Vector)
  • r (float)

Returns

  • void

multiply( a: BGE.Math.Vector, v: BGE.Math.Vector, ): BGE.Math.Vector

static

Parameters

  • a (BGE.Math.Vector)
  • v (BGE.Math.Vector)

Returns

  • BGE.Math.Vector

multEquals(a: BGE.Math.Vector, v: BGE.Math.Vector): void

static

Parameters

  • a (BGE.Math.Vector)
  • v (BGE.Math.Vector)

Returns

  • void

dotProduct(a: BGE.Math.Vector, v: BGE.Math.Vector): float

static

Parameters

  • a (BGE.Math.Vector)
  • v (BGE.Math.Vector)

Returns

  • float

divide(a: BGE.Math.Vector, r: float): BGE.Math.Vector

static

Parameters

  • a (BGE.Math.Vector)
  • r (float)

Returns

  • BGE.Math.Vector

copy(v: BGE.Math.Vector): BGE.Math.Vector

static

Makes a copy of this vector

Parameters

  • v (BGE.Math.Vector)

Returns

  • BGE.Math.Vector

crossProduct( a: BGE.Math.Vector, v: BGE.Math.Vector, ): BGE.Math.Vector

static

Parameters

  • a (BGE.Math.Vector)
  • v (BGE.Math.Vector)

Returns

  • BGE.Math.Vector

norm(v: BGE.Math.Vector): float

static

Gets the square of the length of a vector

Parameters

  • v (BGE.Math.Vector)

Returns

  • float

length(v: BGE.Math.Vector): float

static

Gets the length of a vector

Parameters

  • v (BGE.Math.Vector)

Returns

  • float

manhattanLength(v: BGE.Math.Vector): float

static

Gets the manhattan length of a vector

Parameters

  • v (BGE.Math.Vector)

Returns

  • float

normalize(v: BGE.Math.Vector): void

static

Parameters

  • v (BGE.Math.Vector)

Returns

  • void

getNormalizedCopy(v: BGE.Math.Vector): BGE.Math.Vector

static

Parameters

  • v (BGE.Math.Vector)

Returns

  • BGE.Math.Vector

nearestInt(v: BGE.Math.Vector): BGE.Math.Vector

static

Parameters

  • v (BGE.Math.Vector)

Returns

  • BGE.Math.Vector

toStr(v: BGE.Math.Vector): string

static

Parameters

  • v (BGE.Math.Vector)

Returns

  • string

toArray(v: BGE.Math.Vector): dynamic

static

Parameters

  • v (BGE.Math.Vector)

Returns

  • dynamic

isParallel(a: BGE.Math.Vector, v: BGE.Math.Vector): boolean

static

Parameters

  • a (BGE.Math.Vector)
  • v (BGE.Math.Vector)

Returns

  • boolean

isZero(v: BGE.Math.Vector): boolean

static

Parameters

  • v (BGE.Math.Vector)

Returns

  • boolean

minBound( a: BGE.Math.Vector, v: BGE.Math.Vector, ): BGE.Math.Vector

static

Parameters

  • a (BGE.Math.Vector)
  • v (BGE.Math.Vector)

Returns

  • BGE.Math.Vector

maxBound( a: BGE.Math.Vector, v: BGE.Math.Vector, ): BGE.Math.Vector

static

Parameters

  • a (BGE.Math.Vector)
  • v (BGE.Math.Vector)

Returns

  • BGE.Math.Vector

switchYAndZ(v: BGE.Math.Vector): BGE.Math.Vector

static

Parameters

  • v (BGE.Math.Vector)

Returns

  • BGE.Math.Vector