This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/// Mostly ported from: https://github.com/godotengine/godot/blob/master/core/math/vector2.cpp | |
function Vector2(x, y) constructor { | |
self.x = x; | |
self.y = y; | |
/// @func abs() | |
/// @desc Returns a new vector with all components in absolute values. | |
static absv = function() { | |
return (new Vector2(abs(x), abs(y))); | |
} |