Type for constants used to specify the rounding method to use when computing time.value during timescale conversions.


enum CMTimeRoundingMethod : UInt32


For possible values, see Rounding Methods.


Enumeration Cases

case quickTime

Use CMTimeRoundingMethod.roundTowardZero if converting from larger to smaller scale (that is, from more precision to less precision), but use CMTimeRoundingMethod.roundAwayFromZero if converting from smaller to larger scale (in effect, from less precision to more precision).

case roundAwayFromZero

Round away from zero if abs(fraction) is > 0.

case roundHalfAwayFromZero

Round towards zero if abs(fraction) is < 0.5, away from 0 if abs(fraction) is >= 0.5.

case roundTowardNegativeInfinity

Round towards -infinity if fraction is != 0.

case roundTowardPositiveInfinity

Round towards +infinity if fraction is != 0.

case roundTowardZero

Round towards zero if fraction is != 0.


static var `default`: CMTimeRoundingMethod

Synonym for kCMTimeRoundingMethod_RoundHalfAwayFromZero.