react-native-vision-camera/ios/Extensions/AVFrameRateRange+includes.swift
2021-03-11 19:47:51 +01:00

19 lines
382 B
Swift

//
// AVFrameRateRange+includes.swift
// Cuvent
//
// Created by Marc Rousavy on 15.01.21.
// Copyright © 2021 Facebook. All rights reserved.
//
import AVFoundation
extension AVFrameRateRange {
/**
* Returns true if this [AVFrameRateRange] contains the given [fps]
*/
func includes(fps: Double) -> Bool {
return fps >= minFrameRate && fps <= maxFrameRate
}
}