Contact: aviboots(AT)netvision.net.il
40,026 questions
51,982 answers
573 users
#include <stdio.h> typedef struct vec4 { float x, y, z, w; } vec4; int main(void) { vec4 v4 = {0.2, 0.5, 0.7, 1.0}; printf("%.1f\n", v4.x); printf("%.1f\n", v4.y); printf("%.1f\n", v4.z); printf("%.1f\n", v4.w); } /* run: 0.2 0.5 0.7 1.0 */