0
0
Fork 0
mirror of https://github.com/MarlinFirmware/Marlin.git synced 2025-01-19 08:08:25 +00:00

Fix Skew Correction pre-calculation overflow error

This commit is contained in:
Scott Lahteine 2018-01-22 08:22:28 -06:00
parent 5c6061ea5a
commit 1cea0b6f70

View file

@ -867,7 +867,7 @@
#define _GET_SIDE(a,b,c) (SQRT(2*sq(a)+2*sq(b)-4*sq(c))*0.5)
#define _SKEW_SIDE(a,b,c) tan(M_PI*0.5-acos((sq(a)-sq(b)-sq(c))/(2*c*b)))
#define _SKEW_FACTOR(a,b,c) _SKEW_SIDE(a,_GET_SIDE(a,b,c),c)
#define _SKEW_FACTOR(a,b,c) _SKEW_SIDE(float(a),_GET_SIDE(float(a),float(b),float(c)),float(c))
#ifndef XY_SKEW_FACTOR
constexpr float XY_SKEW_FACTOR = (