snegovick / bcad

B-tier OpenSCAD-like 3D CAD software
Other
3 stars 0 forks source link

Fix ranges calculation #14

Closed snegovick closed 4 years ago

snegovick commented 4 years ago

Analysis

During investigation of https://github.com/hugokernel/OpenSCAD_ServoArms library compatibility issues it became obvious that ranges are implemented incorrectly:

  1. 0 difference is treated incorrectly,
  2. Sign is calculated with possible divide by zero case.

Solution

  1. Fix 0 difference case
  2. Fix sign calculation