Home My Page Projects Code Snippets Project Openings diderot
Summary Activity Tracker Tasks SCM

SCM Repository

[diderot] Diff of /branches/pure-cfg/src/lib/diderot.c
ViewVC logotype

Diff of /branches/pure-cfg/src/lib/diderot.c

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 670, Wed Mar 23 13:39:47 2011 UTC revision 671, Wed Mar 23 15:47:23 2011 UTC
# Line 15  Line 15 
15  static void PrintMat4x4 (const char *title, Diderot_Mat4x4_t m)  static void PrintMat4x4 (const char *title, Diderot_Mat4x4_t m)
16  {  {
17  #define M(i)    m[(i)>>2].r[(i)&3]  #define M(i)    m[(i)>>2].r[(i)&3]
18      printf ("%s @ %p:\n", title, m);      printf ("%s @ %p:\n", title, (void *)m);
19      for (int i = 0;  i < 4;  i++) {      for (int i = 0;  i < 4;  i++) {
20          int j = 4*i;          int j = 4*i;
21          printf ("  [ %6f  %6f  %6f  %6f ]\n", M(j+0), M(j+1), M(j+2), M(j+3));          printf ("  [ %6f  %6f  %6f  %6f ]\n", M(j+0), M(j+1), M(j+2), M(j+3));
# Line 320  Line 320 
320      float       f1, f2, f3;      float       f1, f2, f3;
321    
322      while (true) {      while (true) {
323          if (hasDflt)          if (hasDflt) {
324                union3f_t u;
325                u.v = *v;
326              printf("Enter value for %s (default %f %f %f): ",              printf("Enter value for %s (default %f %f %f): ",
327                  name, ((union3f_t)*v).r[0], ((union3f_t)*v).r[1], ((union3f_t)*v).r[2]);                  name, u.r[0], u.r[1], u.r[2]);
328            }
329          else          else
330              printf("Enter value for %s: ", name);              printf("Enter value for %s: ", name);
331          fflush (stdout);          fflush (stdout);

Legend:
Removed from v.670  
changed lines
  Added in v.671

root@smlnj-gforge.cs.uchicago.edu
ViewVC Help
Powered by ViewVC 1.0.0