Browse Source

Merge pull request #9297 from thinkyhead/bf2_fix_skew_factor

[2.0.x] Fix Skew Correction pre-calculation overflow error
pull/1/head
Scott Lahteine 7 years ago
committed by GitHub
parent
commit
62ecc74e76
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
  1. 2
      Marlin/src/inc/Conditionals_post.h

2
Marlin/src/inc/Conditionals_post.h

@ -911,7 +911,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 = (

Loading…
Cancel
Save