Enumeration

CMTimeRoundingMethod

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

Declaration

enum CMTimeRoundingMethod : UInt32

Overview

For possible values, see Rounding Methods.

Topics

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.

Properties

static var `default`: CMTimeRoundingMethod

Synonym for kCMTimeRoundingMethod_RoundHalfAwayFromZero.