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

Method getGridPosition

src/app/ModuleWidget.cpp:1128–1130  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1126}
1127
1128math::Vec ModuleWidget::getGridPosition() {
1129 return ((getPosition() - RACK_OFFSET) / RACK_GRID_SIZE).round();
1130}
1131
1132void ModuleWidget::setGridPosition(math::Vec pos) {
1133 setPosition(pos * RACK_GRID_SIZE + RACK_OFFSET);

Callers

nothing calls this directly

Calls 1

roundMethod · 0.80

Tested by

no test coverage detected