diff --git a/.vscode/settings.json b/.vscode/settings.json new file mode 100644 index 0000000..cad7657 --- /dev/null +++ b/.vscode/settings.json @@ -0,0 +1,3 @@ +{ + "cmake.configureOnOpen": false +} \ No newline at end of file diff --git a/bin_test.go b/bin_test.go index 0d6ee0c..ea54826 100755 --- a/bin_test.go +++ b/bin_test.go @@ -248,6 +248,14 @@ func TestSplitFloat2(t *testing.T) { } +func TestSplitFloat3(t *testing.T) { + f := 2806262383595.7373 // округляет вниз .6985 + + n := SplitFloat(f, 4) + + fmt.Printf("int: %d, frac: %d\n", n.Int, n.Frac) +} + func TestBitOps(t *testing.T) { var b byte = 255