(position, newPosition, relative)
| 7 | const noop = () => {}; |
| 8 | |
| 9 | const translatePosition = (position, newPosition, relative) => { |
| 10 | relative = !!relative; |
| 11 | newPosition = Number(newPosition); |
| 12 | if (Number.isNaN(newPosition)) { |
| 13 | return position; |
| 14 | } |
| 15 | return relative ? (position + newPosition) : newPosition; |
| 16 | }; |
| 17 | |
| 18 | class Toolpath { |
| 19 | g92offset = { |
no outgoing calls
no test coverage detected