Your minuteRotation
variable represents the ANGLE through which you will need to rotate the canvas in order to draw the minute hand in the right position.
According to the Android APIs this angle must be specified in Radians (not in Degrees), hence the use of the value "Math.PI".
PI radians represents HALF OF A COMPLETE ROTATION, i.e. 180 degrees - a half circle.
It is being used (in the expression that you described) merely as a SCALING FACTOR.
An alternative(and clearer,) way of writing the same equation would be :
minuteRotation = (time.minute/ 60.0f) * (float) Math.PI * 2.0f
This alternative version makes clearer the meaning of the various numbers:
- "60.0" is a floating point number that represents the maximum number of minutes possible(in a full rotation)
- "Math.PI * 2" radians is the angular equivalent of a FULL CIRCLE ROTATION (i.e. 360 degrees)
The fraction "time.minute/60.0" therefore represents the fraction of a full hour currently being used up.
Multiplying this by the expression PI*2 then yields the equivalent portion of a full circle expressed as an ANGLE (in Radians).