@@ -57,7 +57,7 @@ float to_radians(float degrees);
5757float to_degrees (float radians );
5858
5959/* Vector 2D */
60- struct vec to_vector2 (float x , float y );
60+ void to_pvector2 (float x , float y , struct vec * result );
6161void pvector2_add (struct vec * a , struct vec * b , struct vec * result );
6262void pvector2_subtract (struct vec * a , struct vec * b , struct vec * result );
6363void pvector2_scale (struct vec * a , float scale , struct vec * result );
@@ -84,6 +84,7 @@ float pvector2_distance_to(struct vec *a, struct vec *b);
8484float pvector2_distance_squared_to (struct vec * a , struct vec * b );
8585void pvector2_linear_interpolation (struct vec * a , struct vec * b , float p , struct vec * result );
8686
87+ struct vec to_vector2 (float x , float y );
8788struct vec vector2_add (struct vec a , struct vec b );
8889struct vec vector2_subtract (struct vec a , struct vec b );
8990struct vec vector2_scale (struct vec a , float scale );
@@ -111,7 +112,7 @@ float vector2_distance_squared_to(struct vec a, struct vec b);
111112struct vec vector2_linear_interpolation (struct vec a , struct vec b , float p );
112113
113114/* Vector 3D */
114- struct vec to_vector3 (float x , float y , float z );
115+ void to_pvector3 (float x , float y , float z , struct vec * result );
115116void pvector3_add (struct vec * a , struct vec * b , struct vec * result );
116117void pvector3_subtract (struct vec * a , struct vec * b , struct vec * result );
117118void pvector3_scale (struct vec * a , float scale , struct vec * result );
@@ -136,6 +137,7 @@ float pvector3_distance_to(struct vec *a, struct vec *b);
136137float pvector3_distance_squared_to (struct vec * a , struct vec * b );
137138void pvector3_linear_interpolation (struct vec * a , struct vec * b , float p , struct vec * result );
138139
140+ struct vec to_vector3 (float x , float y , float z );
139141struct vec vector3_add (struct vec a , struct vec b );
140142struct vec vector3_subtract (struct vec a , struct vec b );
141143struct vec vector3_scale (struct vec a , float scale );
@@ -161,7 +163,7 @@ float vector3_distance_squared_to(struct vec a, struct vec b);
161163struct vec vector3_linear_interpolation (struct vec a , struct vec b , float p );
162164
163165/* Quaternion */
164- struct vec to_quaternion (float x , float y , float z , float w );
166+ void to_pquaternion (float x , float y , float z , float w , struct vec * result );
165167void pquaternion_add (struct vec * a , struct vec * b , struct vec * result );
166168void pquaternion_subtract (struct vec * a , struct vec * b , struct vec * result );
167169void pquaternion_scale (struct vec * a , float scale , struct vec * result );
@@ -189,6 +191,7 @@ void pquaternion_yaw_pitch_roll(float yaw, float pitch, float roll, struct vec *
189191void pquaternion_linear_interpolation (struct vec * a , struct vec * b , float p , struct vec * result );
190192void pquaternion_spherical_linear_interpolation (struct vec * a , struct vec * b , float p , struct vec * result );
191193
194+ struct vec to_quaternion (float x , float y , float z , float w );
192195struct vec quaternion_add (struct vec a , struct vec b );
193196struct vec quaternion_subtract (struct vec a , struct vec b );
194197struct vec quaternion_scale (struct vec a , float scale );
0 commit comments