Vtc.Timecode.divrem

You're seeing just the function divrem, go back to Vtc.Timecode module for more information.
Link to this function

divrem(dividend, divisor, opts \\ [])

View Source

Specs

divrem(
  dividend :: t(),
  divisor :: Ratio.t() | number(),
  opts :: [round_frames: round(), round_remainder: round()]
) :: {t(), t()}

Divides the total frame count of dividend by divisor and returns both a quotient and a remainder as Timecode values.

The quotient returned is equivalent to Timecode.div/3 with the :round option set to :floor.

Options

  • round_frames: How to round the frame count before doing the divrem operation. Default: :closest.

  • round_remainder: How to round the remainder frames when a non-whole frame would be the result. Default: :closest.

Examples

iex> dividend = Timecode.with_frames!("01:00:00:01", Rates.f23_98())
iex> Timecode.divrem(dividend, 4) |> inspect()
"{<00:15:00:00 @ <23.98 NTSC NDF>>, <00:00:00:01 @ <23.98 NTSC NDF>>}"