Amazon EFI Interview Question
Software Engineer / Developerstheta = 30Y - 6X.
where 30 and 6 are the angles covered in 1 hr and 1 min respectively.
thus if time is 1hr 1 min. Then Y = 1, X = 1
so theta = 30-6 = 25deg
If X is 1 min then Y = 30/60 = 0.5
so theta = 30*0.5 - 6 as state above.
|5.5m - 30h|
- XeqtR February 02, 2010If greater than 180, subtract from 360.
This accounts for the change in hour hand for every minute (There is 0.5 degree change in the hour hand for each minute).