Exemple #1
0
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;
}
Exemple #2
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);
}
Exemple #3
0
void FieldSetNodeCoordinates(Node n, float x, float y, float z)
{
	Vector location;
	VectorMake(x, y, z, location);
	FieldSetNodeLocation(n, location);
}