-
Notifications
You must be signed in to change notification settings - Fork 18
Expand file tree
/
Copy pathFPArchiveExtras.h
More file actions
24 lines (22 loc) · 836 Bytes
/
FPArchiveExtras.h
File metadata and controls
24 lines (22 loc) · 836 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
//
// FPArchiveExtras.h
// FormulatePro
//
// Created by Andrew de los Reyes on 1/2/07.
// Copyright 2007 Andrew de los Reyes. All rights reserved.
//
static inline NSArray *arrayFromRect(NSRect r)
{
return [NSArray arrayWithObjects:[NSNumber numberWithFloat:r.origin.x],
[NSNumber numberWithFloat:r.origin.y],
[NSNumber numberWithFloat:r.size.width],
[NSNumber numberWithFloat:r.size.height],
nil];
}
static inline NSRect rectFromArray(NSArray *a)
{
return NSMakeRect([[a objectAtIndex:0] floatValue],
[[a objectAtIndex:1] floatValue],
[[a objectAtIndex:2] floatValue],
[[a objectAtIndex:3] floatValue]);
}