From 0648d5b9b450a4004ad091f607ce77201365b6b3 Mon Sep 17 00:00:00 2001 From: Dima Gordenko <1.e4.kc6@gmail.com> Date: Tue, 1 Aug 2023 18:50:14 +0300 Subject: [PATCH] wp --- .vscode/settings.json | 3 +++ bin_test.go | 8 ++++++++ 2 files changed, 11 insertions(+) create mode 100644 .vscode/settings.json 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