(self, time)
return count
Calculates the number of cycles completed of a motion for a given amount

    of time.

    Args:
      time: The time elapsed since the motion began.

    Returns:
      The number of motion cycles.
Calculates the number of cycles completed of a motion for a given amount
Calculates the number of cycles completed of a motion for a given amount
def calc_cycle_count(self, time):
    """Calculates the number of cycles completed of a motion for a given amount

    of time.

    Args:
      time: The time elapsed since the motion began.

    Returns:
      The number of motion cycles.

    """
    dur = self.get_duration()
    phases = time / dur
    count = int(math.floor(phases))

    if not self.enable_loop():
      count = np.clip(count, 0, 1)

    return count
def calc_cycle_count ( self , time ) : dur = self . get_duration ( ) phases = time / dur count = int ( math . floor ( phases ) ) if not self . enable_loop ( ) : count = np . clip ( count , 0 , 1 ) return count