Menu

#4 Add max for ints in java_lang_Math

open
nobody
Cocoa (1)
5
2009-08-18
2009-08-18
No

I am compiling my Java code to Objective C.

xmlvm java_lang_Math is missing a max method:

In header file:
+ (NSInteger) max: (NSInteger)a b:(NSInteger)b ;

In .m file:
+ (NSInteger) max: (NSInteger)a b:(NSInteger)b
{
return (a >= b) ? a : b;
}

Please add this to the standard library.

Discussion


Log in to post a comment.