MCPcopy Create free account
hub / github.com/CE-Programming/CEmu / computeAngle

Method computeAngle

gui/qt/keypad/arrowkey.cpp:7–9  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

5#include <cmath>
6
7qreal ArrowKey::computeAngle(const QRect &bounds, int gap) {
8 return 45 - 180 * M_1_PI * std::asin(2. * gap / bounds.width());
9}
10QPointF ArrowKey::rotatePoint(QPointF point, int offset) {
11 while (offset--) {
12 std::swap(point.rx() *= -1, point.ry());

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected