MCPcopy Index your code
hub / github.com/react-toolbox/react-toolbox / getPositionRadius

Method getPositionRadius

components/time_picker/ClockHand.js:84–88  ·  view source on GitHub ↗
(position)

Source from the content-addressed store, hash-verified

82 }
83
84 getPositionRadius (position) {
85 const x = this.props.origin.x - position.x;
86 const y = this.props.origin.y - position.y;
87 return Math.sqrt(x * x + y * y);
88 }
89
90 trimAngleToValue (angle) {
91 return this.props.step * Math.round(angle / this.props.step);

Callers 1

moveMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected