Sub

function

Sub(_v)

Description

Subtracts vector _v from this vector and returns the result as a new vector.

Arguments

Name Type Description
_v Struct.BBMOD_Vec2 The vector to subtract from this one.

Returns

Struct.BBMOD_Vec2 The created vector.

Example

var _v1 = new BBMOD_Vec2(1.0, 2.0);
var _v2 = new BBMOD_Vec2(3.0, 4.0);
var _v3 = _v1.Sub(_v); // Equals to BBMOD_Vec2(-2.0, -2.0)
Do you find this page helpful?

Copyright © 2022, BlueBurn. Built on May 16, 2022 using GMDoc.