/ Published in: Objective C
method to convert int to float in ObjC
Expand |
Embed | Plain Text
Copy this code and paste it in your HTML
// http://stackoverflow.com/questions/5728998/objective-c-casting-int-to-float // First objective c style int b = 10; There will be NSNumber instance and messages numberWithInt, floatValue will be send, right? // Second c style int b = 10; float a = (float) b;