Answers for "map square to circle"

0

map a square to a circle

function map(x, y) {
	return [
    	x * Math.sqrt(1 - y * y / 2),
        y * Math.sqrt(1 - x * x / 2)];
}
Posted by: Guest on May-28-2020
0

map square to circle

function map(x, y) {
    return [
        x * Math.sqrt(1 - y * y / 2), 
        y * Math.sqrt(1 - x * x / 2)];
}
Posted by: Guest on February-02-2021

Browse Popular Code Answers by Language