projects
/
pyutils.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
| inline |
side by side
Tiebreak ordering of ranges with the same lower bound using upper bound.
[pyutils.git]
/
src
/
pyutils
/
math_utils.py
diff --git
a/src/pyutils/math_utils.py
b/src/pyutils/math_utils.py
index 8ac6b10a6f9c258d382328959e58496b89cb327e..dd8f33a2e4bf781b658d4ae7266e4a3035412dbb 100644
(file)
--- a/
src/pyutils/math_utils.py
+++ b/
src/pyutils/math_utils.py
@@
-218,6
+218,7
@@
def truncate_float(n: float, decimals: int = 2):
Args:
n: the float to truncate
+ decimals: how many decimal places are desired?
>>> truncate_float(3.1415927, 3)
3.141