aboutsummaryrefslogtreecommitdiff
path: root/static/src/vector.ts
diff options
context:
space:
mode:
authorElizabeth Hunt <elizabeth@simponic.xyz>2024-09-02 20:10:35 -0700
committerElizabeth Hunt <elizabeth@simponic.xyz>2024-09-02 20:10:35 -0700
commitd35ab6cc851d3fc85f55cfb5676f8dc3552fab24 (patch)
treebef9784e90e2e8f8f5b9e05300238747b775e618 /static/src/vector.ts
parenta0a2068b66204d7d06eb3c3b4aa61b28469121f6 (diff)
downloadkennel.hatecomputers.club-d35ab6cc851d3fc85f55cfb5676f8dc3552fab24.tar.gz
kennel.hatecomputers.club-d35ab6cc851d3fc85f55cfb5676f8dc3552fab24.zip
a bit more progress
Diffstat (limited to 'static/src/vector.ts')
-rw-r--r--static/src/vector.ts4
1 files changed, 4 insertions, 0 deletions
diff --git a/static/src/vector.ts b/static/src/vector.ts
index e7be9fa..96bd721 100644
--- a/static/src/vector.ts
+++ b/static/src/vector.ts
@@ -7,4 +7,8 @@ export class Vec2 {
public distance_to(that: Vec2): number {
return Math.sqrt((this.x - that.x) ** 2 + (this.y - that.y) ** 2);
}
+
+ public copy(): Vec2 {
+ return new Vec2(this.x, this.y);
+ }
}