mirror of
https://git.code.sf.net/p/quake/quakeforge
synced 2024-11-27 06:34:11 +00:00
28 lines
320 B
R
28 lines
320 B
R
|
#include "Number.h"
|
||
|
#include "string.h"
|
||
|
|
||
|
@implementation Number
|
||
|
|
||
|
+ (id) newFromInt: (integer) i
|
||
|
{
|
||
|
return [[self alloc] initWithInt: i];
|
||
|
}
|
||
|
|
||
|
- (id) initWithInt: (integer) i
|
||
|
{
|
||
|
value = i;
|
||
|
return [super init];
|
||
|
}
|
||
|
|
||
|
- (integer) intValue
|
||
|
{
|
||
|
return value;
|
||
|
}
|
||
|
|
||
|
- (string) printForm
|
||
|
{
|
||
|
return itos (value);
|
||
|
}
|
||
|
|
||
|
@end
|