Ask your own question, for FREE!
Mathematics 7 Online
OpenStudy (anonymous):

I need to write a function f(x1, x2, a1, a2) where 0 <= x1, x2,a1,a2 < 24. x1, x2 are points on a clock (or circle circumference) and so are a1, a2. I need to calculate the size of the overlap between the two ranges. For example: f(10, 22, 6, 8) = 0 (no overlap) f(22, 7, 6, 8) = 1 (6->7 is the overlap) f(20, 4, 22, 6) = 6 (22->4 is the overlap) I will appreciate any help. Thanks :)

Can't find your answer? Make a FREE account and ask your own questions, OR help others and earn volunteer hours!

Join our real-time social learning platform and learn together with your friends!
Can't find your answer? Make a FREE account and ask your own questions, OR help others and earn volunteer hours!

Join our real-time social learning platform and learn together with your friends!