I was just going though some fairly simple code and came across the following Math to translate degrees to radians,
degrees = customSettingsObj.percent * 360.0;
radians = degrees * (Math.PI / 180);
Now customSettingsObj.percent can be a percentage value between 0% and 100% , in my case its 75.
So in my case the math evaluates to the following:
degrees = 75 * 360.0; // evalues to 27000
radians = degrees * (Math.PI / 180); evalues to 471.23889803846896
I don't understand the math going on above. can anybody explain ?
Thank you.
Presumably your customsettingObj.percent is supposed to represent the percent of a circle the angle represents. As it is a percent, you should divide by $100$, and indeed $75\%$ of a full circle is $270^\circ$. The conversion to radians is fine.