This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#import <Foundation/Foundation.h> | |
void write_data(NSUserDefaults* defaults){ | |
NSMutableArray* array1 = [NSMutableArray array]; | |
NSMutableArray* array2 = [NSMutableArray array]; | |
NSMutableArray* array3 = [NSMutableArray array]; | |
[array3 addObject:@"array3-1"]; | |
[array3 addObject:@"array3-2"]; | |
[array2 addObject:@"array2-1"]; | |
[array2 addObject:@"array2-2"]; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// test3 = 0.922481 atan2f float | |
// test4 = 1.067147 atan2f double | |
// test2 = 2.844713 atan2 double | |
// test1 = 3.252539 atan2 float | |
#import "Atan2TestAppDelegate.h" | |
#define COUNT (1000000) | |
@implementation Atan2TestAppDelegate |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// test2 = 0.365886 // (float)M_PI | |
// test1 = 0.603662 // M_PI | |
#import "PiTestAppDelegate.h" | |
#define COUNT (1000000) | |
@implementation PiTestAppDelegate | |
@synthesize window; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//test1 | |
LM3: | |
add r3, sp, #8 | |
ldr r3, [r3] | |
lsl r3, r3, #2 | |
mov r2, r3 | |
add r3, sp, #4 | |
ldr r3, [r3] | |
add r3, r2, r3 | |
ldr r3, [r3] |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#import <Foundation/Foundation.h> | |
int main() { | |
NSAutoreleasePool* pool = [[NSAutoreleasePool alloc] init]; | |
NSMutableDictionary *dictionary = | |
[NSMutableDictionary dictionaryWithObjectsAndKeys:[NSNumber numberWithInt:1], @"red", | |
[NSNumber numberWithInt:2], @"green", | |
[NSNumber numberWithInt:3], @"blue", | |
nil]; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#import <Foundation/Foundation.h> | |
int main() { | |
NSAutoreleasePool* pool = [[NSAutoreleasePool alloc] init]; | |
CGPoint p1 = CGPointMake(3.0f, 5.0f); | |
CGPoint p2 = CGPointMake(7.0f, 11.0f); | |
CGPoint p3 = CGPointMake(p1.x + p2.x, p1.y + p2.y); | |
NSLog(@"%f, %f", p3.x, p3.y); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package | |
{ | |
import flash.display.Sprite; | |
public class Test extends Sprite { | |
public function Test(){ | |
log(Math.asin(0.5)); | |
log(Math.asin(0.5) * 180 / Math.PI); | |
log(Math.acos(0.865)); | |
log(Math.acos(0.865) * 180 / Math.PI); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package | |
{ | |
import flash.display.Sprite; | |
public class Test extends Sprite { | |
public function Test(){ | |
log(Math.atan(0.577) * 180 / Math.PI); | |
log(Math.atan2(1, 2) * 180 / Math.PI); | |
log(Math.atan2(-1, -2) * 180 / Math.PI); | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package{ | |
import flash.display.Sprite; | |
import flash.events.Event; | |
public class RotateToMouse extends Sprite { | |
private var arrow:Arrow; | |
public function RotateToMouse(){ | |
init(); | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#import <Foundation/Foundation.h> | |
int main() { | |
NSAutoreleasePool* pool = [[NSAutoreleasePool alloc] init]; | |
NSMutableArray* array = [NSMutableArray array]; | |
[array addObject:[NSArray array]]; | |
[array addObject:[NSNull null]]; | |
[array addObject:[NSArray array]]; | |
[array addObject:[NSNull null]]; |