diff options
author | Kevin O'Connor <kevin@koconnor.net> | 2016-10-09 20:57:55 -0400 |
---|---|---|
committer | Kevin O'Connor <kevin@koconnor.net> | 2016-10-10 11:39:26 -0400 |
commit | ab54fcd44381a9d5d9a524784760c65b0e789d7b (patch) | |
tree | e8acb2be7c622bea98dea91ce8fe5a895f705fc6 /klippy/heater.py | |
parent | 9fa0a62c8a0990178aa2f0485d48ee7aaf975e7a (diff) | |
download | kutter-ab54fcd44381a9d5d9a524784760c65b0e789d7b.tar.gz kutter-ab54fcd44381a9d5d9a524784760c65b0e789d7b.tar.xz kutter-ab54fcd44381a9d5d9a524784760c65b0e789d7b.zip |
stepcompress: Check for small negative numbers on sqrt() calls
It's theoretically possible for floating point truncation to cause a
math formula to return a small negative number instead of 0. If
sqrt() is called on this small negative number it could cause a
crash. Check for this case and return 0.
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
Diffstat (limited to 'klippy/heater.py')
0 files changed, 0 insertions, 0 deletions