MCPcopy Create free account
hub / github.com/microsoft/SandDance / circleRadius

Function circleRadius

docs/app/js/sanddance-app.js:132424–132429  ·  view source on GitHub ↗
(cosRadius, point)

Source from the content-addressed store, hash-verified

132422}
132423// Returns the signed angle of a cartesian point relative to [cosRadius, 0, 0].
132424function circleRadius(cosRadius, point) {
132425 point = (0, _cartesianJs.cartesian)(point), point[0] -= cosRadius;
132426 (0, _cartesianJs.cartesianNormalizeInPlace)(point);
132427 var radius = (0, _mathJs.acos)(-point[1]);
132428 return ((-point[2] < 0 ? -radius : radius) + (0, _mathJs.tau) - (0, _mathJs.epsilon)) % (0, _mathJs.tau);
132429}
132430exports.default = function() {
132431 var center = (0, _constantJsDefault.default)([
132432 0,

Callers 1

circleStreamFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected