From ca4eb9107b87708f6ead8f0abcecfbcd4941d504 Mon Sep 17 00:00:00 2001 From: TheSaminator Date: Sat, 4 Jun 2022 12:24:39 -0400 Subject: [PATCH] bruh --- src/commonMain/kotlin/starshipfights/game/math.kt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/commonMain/kotlin/starshipfights/game/math.kt b/src/commonMain/kotlin/starshipfights/game/math.kt index f7878fc..ea91db8 100644 --- a/src/commonMain/kotlin/starshipfights/game/math.kt +++ b/src/commonMain/kotlin/starshipfights/game/math.kt @@ -41,7 +41,7 @@ inline val Vec2.angle: Double inline val Vec2.normal: Vec2 get() { val thisMagnitude = this.magnitude - return if (thisMagnitude == 0.0) + return if (thisMagnitude < EPSILON) Vec2(0.0, 0.0) else this / thisMagnitude } -- 2.25.1