(self, time)
return phase
Calaculates the phase for a given point in time.

    The phase is a scalar
    value between [0, 1], with 0 denoting the start of a motion, and 1 the end
    of a motion.

    Args:
      time: The time to be used when computing the phase.

    Returns:
      The duration of the motion.
Calaculates the phase for a given point in time.
Calaculates the phase for a given point in time .
def calc_phase(self, time):
    """Calaculates the phase for a given point in time.

    The phase is a scalar
    value between [0, 1], with 0 denoting the start of a motion, and 1 the end
    of a motion.

    Args:
      time: The time to be used when computing the phase.

    Returns:
      The duration of the motion.

    """
    dur = self.get_duration()
    phase = time / dur

    if self.enable_loop():
      phase -= np.floor(phase)
    else:
      phase = np.clip(phase, 0.0, 1.0)

    return phase
def calc_phase ( self , time ) : dur = self . get_duration ( ) phase = time / dur if self . enable_loop ( ) : phase -= np . floor ( phase ) else : phase = np . clip ( phase , 0.0 , 1.0 ) return phase