Files
weatherapi/internal/platform/constants/conversion.go
Eric Rakestraw 27817f9e43
All checks were successful
ci/woodpecker/push/build-image Pipeline was successful
Initial MVP commit
2026-03-17 08:35:16 -05:00

18 lines
300 B
Go

package constants
func CelsiusToFahrenheit(c float64) float64 {
return c*9.0/5.0 + 32.0
}
func FahrenheitToCelsius(f float64) float64 {
return (f - 32.0) * 5.0 / 9.0
}
func KmhToMph(kmh float64) float64 {
return kmh * MphPerKmh
}
func MphToKmh(mph float64) float64 {
return mph * KmhPerMph
}