Can someone plz make me a calculator??? I need to use it on one of my subdomains...
Read Ad-free Manga, Manhwa, and Manhua at https://trilliux.me!
DateTime dateTime = DateTime.Now;
int hour = dateTime.Hour % 12; // also converts 24hrs to 12hrs format
int minute = dateTime.Minute;
int sec = dateTime.Second;
float hourRadian = hour * 360/12 * PI/180;
float minRadian = minute * 360/60 * PI/180;
float secRadian = sec * 360/60 * PI/180;
X = r*cos(angle)
Y = r*sin(angle)
float hourEndPointX = lengthofHourHand * System.Math.Sin(hourRadian)
float hourEndPointY = lengthofHourHand * System.Math.Cos(hourRadian)
Line(centerX, centerY, hourEndPointX, hourEndPointY)float hour = dateTime.Hour%12 + (float)dateTime.Minute/60
float hourRadian = hour * 360/12 * PI/180;float hourEndPointX = lengthofHourHand * System.Math.Sin(hourRadian);
float hourEndPointY = lengthofHourHand * System.Math.Cos(hourRadian);
Line(centerX, centerY, hourEndPointX, hourEndPointY);
Permissions in this forum:
You cannot reply to topics in this forum