I have the following 2 lines of code that I am moving to Swift but I am a little stuck.
CMTime trimmingTime = CMTimeMake(lround(videoAsset.naturalTimeScale / videoAsset.nominalFrameRate), videoAsset.naturalTimeScale);
CMTimeRange timeRange = CMTimeRangeMake(trimmingTime, CMTimeSubtract(videoAsset.timeRange.duration, trimmingTime));
When converting the below line to begin with I get the following error.
var trimmingTime: CMTime
trimmingTime = CMTimeMake(value: lround(videoAsset.naturalTimeScale / videoAsset.nominalFrameRate), timescale: videoAsset.naturalTimeScale)
Binary operator '/' cannot be applied to operands of type 'CMTimeScale' (aka 'Int32') and 'Float'
I have tried a few different approaches but nothing seems to work.