سؤال

I am trying to set my camera exposure settings to default configuration using setExposurePointOfInterest:CGPointMake(0.5, 0.5) Is this different from setExposurePointOfInterest:CGPointMake(0.5f, 0.5f)

If I use the CGPoint without float, will it cause change in the auto exposure behaviour?

هل كانت مفيدة؟

المحلول

The result here will be exactly the same.

The CGPointMake() function is declared to take CGFloat values (which are defined on 32-bit as floats and on 64-bit as doubles). If you pass in values of a different type they will be implicitly casted for you.

Since your value (.5) only requires accuracy out to a single decimal point you can safely cast it between double and float types with no information loss.

مرخصة بموجب: CC-BY-SA مع الإسناد
لا تنتمي إلى StackOverflow
scroll top