Search snippets
Browse Code Answers
FAQ
Usage docs
Log In
Sign Up
Home
Javascript
map a square to a circle
eddy
Programming language:
Javascript
2021-07-22 17:16:06
0
Q:
map a square to a circle
Fabio Turati
Code:
Javascript
2021-06-12 12:28:24
function map(x, y) { return [ x * Math.sqrt(1 - y * y / 2), y * Math.sqrt(1 - x * x / 2)]; }
0
Tags
map
Related
how to draw square to the center in canvas
New to Communities?
Join the community