diff --git a/util.cpp b/util.cpp index 4b2bc26c..469cc4f1 100644 --- a/util.cpp +++ b/util.cpp @@ -283,4 +283,25 @@ string parser_help() { } logger hlog; + +// kz: utility for printing +// if it is close to 0, assume it is floating errors + +ld kz(ld x) { + if(abs(x) < 1e-6) return 0; + return x; + } + +hyperpoint kz(hyperpoint h) { + for(int d=0; d