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