Browse Source

Fix Skew Correction pre-calculation overflow error

Scott Lahteine 6 years ago
parent
commit
2ebf52e57d
1 changed files with 1 additions and 1 deletions
  1. 1
    1
      Marlin/src/inc/Conditionals_post.h

+ 1
- 1
Marlin/src/inc/Conditionals_post.h View File

@@ -911,7 +911,7 @@
911 911
 
912 912
   #define _GET_SIDE(a,b,c) (SQRT(2*sq(a)+2*sq(b)-4*sq(c))*0.5)
913 913
   #define _SKEW_SIDE(a,b,c) tan(M_PI*0.5-acos((sq(a)-sq(b)-sq(c))/(2*c*b)))
914
-  #define _SKEW_FACTOR(a,b,c) _SKEW_SIDE(a,_GET_SIDE(a,b,c),c)
914
+  #define _SKEW_FACTOR(a,b,c) _SKEW_SIDE(float(a),_GET_SIDE(float(a),float(b),float(c)),float(c))
915 915
 
916 916
   #ifndef XY_SKEW_FACTOR
917 917
     constexpr float XY_SKEW_FACTOR = (

Loading…
Cancel
Save