MCPcopy Create free account
hub / github.com/VCVRack/Rack / setGridPosition

Method setGridPosition

src/app/ModuleWidget.cpp:1132–1134  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1130}
1131
1132void ModuleWidget::setGridPosition(math::Vec pos) {
1133 setPosition(pos * RACK_GRID_SIZE + RACK_OFFSET);
1134}
1135
1136math::Vec ModuleWidget::getGridSize() {
1137 return (getSize() / RACK_GRID_SIZE).round();

Callers 3

setModulePosForceMethod · 0.80
squeezeModulePosMethod · 0.80
unsqueezeModulePosMethod · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected