float val = [mySignedNumber floatValue];
NSNumber* myAbsoluteNumber = [NSNumber numberWithFloat:fabsf( val )];
(note NSNumber is immutable so you can't change what it contains to
remove the sign. You can create a new NSNumber with the absolute value
however).
hth,
Graham
On 23 Jul 2008, at 6:41 pm, Steven Hamilton wrote:
Hi folks,
Can anyone tell me the most efficient way to unsign a floatvalue in
an NSNumber?
Like change a -1.47 to 1.47 ?
Thanks
_______________________________________________
Cocoa-dev mailing list ([email protected])
Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com
This email sent to [EMAIL PROTECTED]