First commit with a very simple first function
This commit is contained in:
@@ -0,0 +1,5 @@
|
||||
# UnitConv
|
||||
Basic package to hold reusable unit conversion operations.
|
||||
|
||||
Used mainly for my simracing projects so that's the scope of the unit conversions I need
|
||||
here.
|
||||
@@ -0,0 +1,7 @@
|
||||
// Package unitconv provides useful unit conversions
|
||||
package unitconv
|
||||
|
||||
// MsToKph converts a float64 representing m/s to an int representing km/h
|
||||
func MsToKph(v float32) int {
|
||||
return int(3.6 * v)
|
||||
}
|
||||
Reference in New Issue
Block a user