MCPcopy Create free account
hub / github.com/cncjs/gcode-toolpath / translateX

Method translateX

src/Toolpath.js:692–700  ·  view source on GitHub ↗
(x, relative)

Source from the content-addressed store, hash-verified

690 }
691 }
692 translateX(x, relative) {
693 if (x !== undefined) {
694 x = this.isImperialUnits() ? in2mm(x) : x;
695 }
696 if (relative === undefined) {
697 relative = this.isRelativeDistance();
698 }
699 return translatePosition(this.position.x, x, !!relative);
700 }
701 translateY(y, relative) {
702 if (y !== undefined) {
703 y = this.isImperialUnits() ? in2mm(y) : y;

Callers 2

ToolpathClass · 0.95
translateIMethod · 0.95

Calls 4

isImperialUnitsMethod · 0.95
isRelativeDistanceMethod · 0.95
in2mmFunction · 0.85
translatePositionFunction · 0.85

Tested by

no test coverage detected