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

SCM Repository

[diderot] Diff of /branches/lamont/src/lib/common/grid.c
ViewVC logotype

Diff of /branches/lamont/src/lib/common/grid.c

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

revision 2301, Tue Mar 19 19:25:25 2013 UTC revision 2302, Tue Mar 19 20:17:15 2013 UTC
# Line 85  Line 85 
85    
86      Diderot_real_t x = (pos.r[0] - winSize.r[XMIN]) * gridWidth / (winSize.r[XMAX] - winSize.r[XMIN]);      Diderot_real_t x = (pos.r[0] - winSize.r[XMIN]) * gridWidth / (winSize.r[XMAX] - winSize.r[XMIN]);
87      Diderot_real_t y = (pos.r[1] - winSize.r[YMAX]) * -gridHeight / (winSize.r[YMAX] - winSize.r[YMIN]);      Diderot_real_t y = (pos.r[1] - winSize.r[YMAX]) * -gridHeight / (winSize.r[YMAX] - winSize.r[YMIN]);
88      Diderot_real_t z = 0;      Diderot_real_t z = (pos.r[2] - winSize.r[ZMIN]) * gridDepth / (winSize.r[ZMAX] - winSize.r[ZMIN]);
89    
90      return vec3(x,y,z);      return vec3(x,y,z);
91  }  }
# Line 114  Line 114 
114      Diderot_union3_t gridSize;      Diderot_union3_t gridSize;
115      gridSize.v = *(ctx->gridSize);      gridSize.v = *(ctx->gridSize);
116    
117     return UMAD(u.i[1],((Diderot_int_t)gridSize.r[1] + 2),u.i[0]);      return UMAD(UMAD(u.i[1],((Diderot_int_t)gridSize.r[0] + 2),u.i[0]),((Diderot_int_t)gridSize.r[1] + 2),u.i[2]);
118  }  }

Legend:
Removed from v.2301  
changed lines
  Added in v.2302

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