Feature/math util (#22)

Development supports the math package
This commit is contained in:
jeffery
2023-04-12 11:10:07 +08:00
committed by GitHub
parent 9a8c60b30a
commit f97913a2bc
30 changed files with 501 additions and 71 deletions

23
mathUtil/ceil_test.go Normal file
View File

@@ -0,0 +1,23 @@
package mathUtil
import (
"testing"
)
func TestCeilFloat32(t *testing.T) {
var input float32 = -12.4
var expected int = -12
res := Ceil(input)
if res != expected {
t.Errorf("ceil error")
}
}
func TestCeilFloat64(t *testing.T) {
var input float64 = 12.4
var expected int = 13
res := Ceil(input)
if res != expected {
t.Errorf("ceil error")
}
}