aboutsummaryrefslogtreecommitdiff
path: root/src/main/kotlin/Extensions.kt
diff options
context:
space:
mode:
authorJames Barnett <noreply@jamesbarnett.xyz>2020-12-28 16:25:19 +0000
committerJames Barnett <noreply@jamesbarnett.xyz>2020-12-28 16:25:19 +0000
commit9e886b392fbc6f8dfac1ce8f6943a7a1679bce74 (patch)
tree81ff992d818b5aa92090b6c02f5685e08bb6fdab /src/main/kotlin/Extensions.kt
parentf28500d963d6546feda522d7748a0462a568ba28 (diff)
downloadkotlin-raycaster-9e886b392fbc6f8dfac1ce8f6943a7a1679bce74.tar.xz
kotlin-raycaster-9e886b392fbc6f8dfac1ce8f6943a7a1679bce74.zip
Refactor input handling. General cleanup
Diffstat (limited to 'src/main/kotlin/Extensions.kt')
-rw-r--r--src/main/kotlin/Extensions.kt7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/main/kotlin/Extensions.kt b/src/main/kotlin/Extensions.kt
new file mode 100644
index 0000000..989118f
--- /dev/null
+++ b/src/main/kotlin/Extensions.kt
@@ -0,0 +1,7 @@
+fun Double.sine(): Double {
+ return kotlin.math.sin(toRadians(this))
+}
+
+fun Double.cosine(): Double {
+ return kotlin.math.cos(toRadians(this))
+} \ No newline at end of file