TEchnical Cites

  • 04:40:43 am on February 26, 2009 | 0
    Tags:

    NSValue can store arbitrary structures, as long as they are of fixed length.

    float test[4][3] = {{1.0, 2.0, 3.0}};
    float result[4][3] = {0.0};

    NSValue *value = [NSValue value:test withObjCType:@encode(float[4] [3])];
    [value getValue:result];

    NSLog(@"%f %f %f", result[0][0], result[0][1], result[0][3]);

    Advertisements
     

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: