

#import "Size.h"

@implementation Size

 - initFromWidth:(float)w height:(float)h
{
	[super init];
	size.height = h;
	size.width = w;
	return self;
}

- initFrom:(NXSize *)s
{
	[super init];
	size = *s;
	return self;
}
 
- (NXSize *)asCPointer				{ return (NXSize *)&size; }
- setWidth:(float)w					{ size.width = w; return self; }
- setWidth:(float)w height:(float)h	{ size.width = w; size.height = h; return self; }
- setHeight:(float)h				{ size.height = h; return self; }
- (double)width						{ return (double)size.width; }
- (double)height						{ return (double)size.height; }

@end