set

function

set(_x, _y)

Description

Replaces both components of the vector with new ones.

Arguments

Name Type Description
_x real The x component of the vector.
_y real The y component of the vector.

Returns

vec2 self

Example

vec1 = new Vec2(10, 5);
show_debug_message(vec1); // Result: { x : 10, y : 5 }
vec1.set(13, 8);
show_debug_message(vec1); // Result: { x : 13, y : 8 }

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