2

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?

PeeHaa
  • 71,436
  • 58
  • 190
  • 262
thar_bun
  • 820
  • 1
  • 5
  • 20

1 Answers1

2

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.

Mike Vosseller
  • 4,097
  • 5
  • 26
  • 28
  • While you may be true for devices with 32 bit devices. I am not sure about the devices on 64 bit devices.Because `CGFloat` structure uses double or float based on the preprocessor macro of __LP64__ – thar_bun Dec 18 '13 at 10:10