sub_new

function

sub_new(_vector)

Description

Substracts the specified vector from this vector.

Arguments

Name Type Description
_vector vec2 The vector being substracted.

Returns

vec2 Result of the substraction in new vector.

Example

vec1 = new Vec2(10, 10);
vec2 = new Vec2(8, 6);
vec3 = vec1.sub_new(vec2);
show_debug_message(vec1); // Result: { x : 10, y : 10 }
show_debug_message(vec3); // Result: { x : 2, y : 4 }

Copyright © 2020, eL-Falso. Built on December 14, 2020 using GMDoc.