Vtc.Utils.Rational.round

You're seeing just the function round, go back to Vtc.Utils.Rational module for more information.
Link to this function

round(x, method \\ :closest)

View Source

Specs

round(t(), :closest | :floor | :ceil) :: integer()
round(t(), :off) :: t()

Rounds x based on method.

Arguments

  • x: The Rational value to round.

  • method: Rounding strategy. Defaults to :closest.

    • :closest: Round the to the closet whole frame, rounding up when fractional remainder is equal to 1/2.
    • :floor: Always round down to the closest whole-frame.
    • :ciel: Always round up to the closest whole-frame.
    • :off: Pass value through without rounding.