diff options
| author | James Barnett <noreply@jamesbarnett.xyz> | 2020-12-29 20:13:01 +0000 |
|---|---|---|
| committer | James Barnett <noreply@jamesbarnett.xyz> | 2020-12-29 20:13:01 +0000 |
| commit | ad192fe7068081ed88f8616581bf450d601e99b1 (patch) | |
| tree | e3cda400065c051ee628dbeb85709f778c90311e /src/main/kotlin/Extensions.kt | |
| parent | e816c727624056b91c5ef5152c3121a7f8497c5b (diff) | |
| download | kotlin-raycaster-ad192fe7068081ed88f8616581bf450d601e99b1.tar.xz kotlin-raycaster-ad192fe7068081ed88f8616581bf450d601e99b1.zip | |
Add textures
Diffstat (limited to 'src/main/kotlin/Extensions.kt')
| -rw-r--r-- | src/main/kotlin/Extensions.kt | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/main/kotlin/Extensions.kt b/src/main/kotlin/Extensions.kt index 989118f..8c11af1 100644 --- a/src/main/kotlin/Extensions.kt +++ b/src/main/kotlin/Extensions.kt @@ -4,4 +4,8 @@ fun Double.sine(): Double { fun Double.cosine(): Double { return kotlin.math.cos(toRadians(this)) +} + +fun Double.toFlooredInt(): Int { + return kotlin.math.floor(this).toInt() }
\ No newline at end of file |