aboutsummaryrefslogtreecommitdiff
path: root/utils.go
diff options
context:
space:
mode:
authorMartin Lehoux <martin@lehoux.net>2020-04-05 23:34:05 -0700
committerMartin Lehoux <martin@lehoux.net>2020-04-05 23:34:05 -0700
commit4c823f57959a5d821a9f00d8e8c7f57c08ac2ded (patch)
tree483ba7af5cbcd051cf9835e7cb4821e6d8cbd2f4 /utils.go
parent09126c915e0f410fddfee14239589fad250ea712 (diff)
feat - Camera VFOV
Diffstat (limited to 'utils.go')
-rw-r--r--utils.go6
1 files changed, 6 insertions, 0 deletions
diff --git a/utils.go b/utils.go
index ca40e87..a0d0e7c 100644
--- a/utils.go
+++ b/utils.go
@@ -1,5 +1,7 @@
package main
+import "math"
+
// FMin return mins of floats
func FMin(a float64, b float64) float64 {
if a >= b {
@@ -7,3 +9,7 @@ func FMin(a float64, b float64) float64 {
}
return b
}
+
+func DegreesToRadians(degrees float64) float64 {
+ return degrees * 2.0 * math.Pi / 360.0
+}