Skip to content

Instantly share code, notes, and snippets.

@toamitkumar
Created November 19, 2012 10:55
Show Gist options
  • Save toamitkumar/4110090 to your computer and use it in GitHub Desktop.
Save toamitkumar/4110090 to your computer and use it in GitHub Desktop.
NSDecimal newPoint[2];
new_point = Pointer.new(NSDecimal.type, 2)
NSDecimalRound(&newPoint[0], &newPoint[0], 0, NSRoundPlain);
NSDecimalRound(new_point, new_point, 0, NSRoundPlain)
int x = [[NSDecimalNumber decimalNumberWithDecimal:newPoint[0]] intValue];
NSDecimalNumber.decimalNumberWithDecimal(new_point[0]).intValue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment