Is there something wrong with this implementation?
It compiles, but when it runs, the program ends without displaying anything.
THANKS!
Code:
#include <stdio.h>
#include <stdlib.h>
float Tval_v_0_maxZ;
float Tval_force_v_0;
float f_v_0_x;
float f_v_0_y;
float f_v_0_z;
float r_v_0_x;
float r_v_0_y;
float r_v_0_z;
// Xforce = Tval(Xreal);
// Yforce = Tval(Yreal);
// Zforce = Tval(Zreal);
int main (void) {
r_v_0_x = 10;
r_v_0_y = 15;
r_v_0_z = -40;
/* case p */
Tval_v_0_maxZ = -20 / r_v_0_z;
/* Vertex 0 */
do
Tval_force_v_0 = rand();
while (Tval_force_v_0 > Tval_v_0_maxZ);
f_v_0_x = Tval_force_v_0 * r_v_0_x;
f_v_0_y = Tval_force_v_0 * r_v_0_y;
f_v_0_z = Tval_force_v_0 * r_v_0_z;
printf("Force Vertex 0 is (%f,%f,%f) using Tval_force_v_0 of %f \n",f_v_0_x,f_v_0_y,f_v_0_z,Tval_force_v_0);
return(0);
}