mirror of
https://github.com/GlueOps/autoglue.git
synced 2026-02-13 21:00:06 +01:00
feat: sdk migration in progress
This commit is contained in:
14
terraform-provider-autoglue/internal/provider/num.go
Normal file
14
terraform-provider-autoglue/internal/provider/num.go
Normal file
@@ -0,0 +1,14 @@
|
||||
package provider
|
||||
|
||||
import "math"
|
||||
|
||||
func round6(x float64) float64 {
|
||||
return math.Round(x*1e6) / 1e6
|
||||
}
|
||||
|
||||
func f32ptrToTF64(v *float32) float64 {
|
||||
if v == nil {
|
||||
return 0
|
||||
}
|
||||
return round6(float64(*v))
|
||||
}
|
||||
Reference in New Issue
Block a user