aboutsummaryrefslogtreecommitdiffstats
path: root/klippy/heater.py
diff options
context:
space:
mode:
authorKevin O'Connor <kevin@koconnor.net>2016-10-09 20:57:55 -0400
committerKevin O'Connor <kevin@koconnor.net>2016-10-10 11:39:26 -0400
commitab54fcd44381a9d5d9a524784760c65b0e789d7b (patch)
treee8acb2be7c622bea98dea91ce8fe5a895f705fc6 /klippy/heater.py
parent9fa0a62c8a0990178aa2f0485d48ee7aaf975e7a (diff)
downloadkutter-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