BIG FORMATING COMMIT

This commit is contained in:
2023-07-30 15:55:22 +02:00
parent 088fce0aaa
commit 91972107eb
103 changed files with 1610 additions and 1585 deletions

View File

@@ -6,14 +6,14 @@ import lib.Vec.Vec2;
Reporesents a Point in a 2D `Int` System.
Basicly a wrapper for Vec2<Int> with some extra functions.
**/
@:forward(x,y)
abstract Pos(Vec2<Int>) from Vec2<Int> to Vec2<Int>{
@:forward(x, y)
abstract Pos(Vec2<Int>) from Vec2<Int> to Vec2<Int> {
inline public function new(i:Vec2<Int>) {
this = i;
}
@:op(A + B)
public function add(rhs: Vec2<Int>):Pos {
public function add(rhs:Vec2<Int>):Pos {
return new Pos({
y: this.y + rhs.y,
x: this.x + rhs.x,
@@ -21,7 +21,7 @@ abstract Pos(Vec2<Int>) from Vec2<Int> to Vec2<Int>{
}
@:op(A - B)
public function sub(rhs: Vec2<Int>):Pos {
public function sub(rhs:Vec2<Int>):Pos {
return new Pos({
y: this.y - rhs.y,
x: this.x - rhs.x,
@@ -29,7 +29,7 @@ abstract Pos(Vec2<Int>) from Vec2<Int> to Vec2<Int>{
}
@:op(A * B)
public function multiply(rhs: Vec2<Int>): Pos {
public function multiply(rhs:Vec2<Int>):Pos {
return new Pos({
y: this.y * rhs.y,
x: this.x * rhs.x,
@@ -37,7 +37,7 @@ abstract Pos(Vec2<Int>) from Vec2<Int> to Vec2<Int>{
}
@:op(-A)
public function negate(): Pos {
public function negate():Pos {
return new Pos({
y: -this.y,
x: -this.x,