MCPcopy Create free account
hub / github.com/Lobos/react-ui / getAngle

Function getAngle

src/utils/circle.js:3–7  ·  view source on GitHub ↗
(r, angle, x0, y0)

Source from the content-addressed store, hash-verified

1'use strict';
2
3function getAngle(r, angle, x0, y0) {
4 let x1 = x0 + r * Math.cos(angle * Math.PI / 180);
5 let y1 = y0 + r * Math.sin(angle * Math.PI / 180);
6 return [x1.toFixed(2), y1.toFixed(2)];
7}
8
9/**
10 * @param {count} point's count

Callers 1

getPositionsFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…