Skip to content

Commit

Permalink
Added mirror function
Browse files Browse the repository at this point in the history
  • Loading branch information
Tornado-Technology committed Nov 28, 2023
1 parent b028748 commit 02c3401
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions scripts/Vector2/Vector2.gml
Original file line number Diff line number Diff line change
Expand Up @@ -360,6 +360,17 @@ function Vector2(x = 0, y = 0) constructor {
set(get_lerp(target, amount));
return self;
}

/// @return {Struct.Vector2}
static get_mirror = function() {
return new Vector2(y, x);
}

/// @return {Id.Instance<Struct.Vector2>}
static set_mirror = function() {
set(get_mirror());
return self;
}

/// @retunr {Struct.Vector2}
static copy = function() {
Expand Down

0 comments on commit 02c3401

Please sign in to comment.