int main(int argc, const char * argv[]) { Vector vector = VectorMake(3.0, 4.0); float length = VectorLength(vector); printf("length = %f\n", length); VectorSetX(vector, 5.0); printf("vector.x = %f\n", vector.x); return 0; }
void VectorPointerExperiment(Vector *vector) { printf("vector = %p\n", vector); Vector newVector = VectorMake(4.0, 5.0); vector = &newVector; printf("modified vector = %p\n", vector); }
void FieldSetNodeCoordinates(Node n, float x, float y, float z) { Vector location; VectorMake(x, y, z, location); FieldSetNodeLocation(n, location); }