Function phase( t, period, t0, phase0 )

Description:
Returns the offset phase of an offset value within a period. The reference value t0 corresponds to integer phase value, and the phase offset phase0 determines the starting value for the phase range.

For positive period, the returned value is in the range [phase0,phase0+1).

Parameters:
t (floating point)
value
period (floating point)
folding period
t0 (floating point)
reference value, corresponding to phase zero
phase0 (floating point)
offset for phase
Return Value (floating point):
offset phase
Examples:
Signature:
double phase(double, double, double, double)