+ 1

Don't understand the parameter of rotate ?

ctx.fillStyle = "#FF0000"; ctx.fillRect(10,10, 100, 100); ctx.rotate( (Math.PI / 180) * 25); //rotate 25 degrees. ctx.fillStyle = "#0000FF"; ctx.fillRect(10,10, 100, 100); what is (Math.PI/180) ? what does this mean?

7th Mar 2018, 7:24 AM
Serious Sam
Serious Sam - avatar
6 Respostas
+ 4
radians
18th Sep 2020, 5:15 AM
Sardor Ravshanov
Sardor Ravshanov - avatar
+ 1
1=nig 2=nog
10th Jul 2019, 10:42 AM
dylan carrick
+ 1
radians
3rd Nov 2020, 2:55 PM
Aseer Hosen
Aseer Hosen - avatar
+ 1
radians
9th Dec 2020, 5:42 AM
Emad Pouryazdanpanah
Emad Pouryazdanpanah - avatar
+ 1
radians
11th May 2022, 9:24 PM
maryambabaee
+ 1
radians
31st Aug 2022, 2:36 PM
Dr Ali Ramadan Ali