Update tri and cube with stage

These changes were cherry-picked from nvidia-dev-20150218 and
KhronosGroup/GDC-stable.
diff --git a/demos/linmath.h b/demos/linmath.h
index 7f7fe24..5de34e9 100644
--- a/demos/linmath.h
+++ b/demos/linmath.h
@@ -369,7 +369,7 @@
         M[0][0] = 2.f*n/(r-l);
         M[0][1] = M[0][2] = M[0][3] = 0.f;
 
-        M[1][1] = 2.*n/(t-b);
+        M[1][1] = 2.f*n/(t-b);
         M[1][0] = M[1][2] = M[1][3] = 0.f;
 
         M[2][0] = (r+l)/(r-l);
@@ -400,7 +400,7 @@
 {
         /* NOTE: Degrees are an unhandy unit to work with.
          * linmath.h uses radians for everything! */
-        float const a = 1.f / tan(y_fov / 2.f);
+        float const a = (float)(1.f / tan(y_fov / 2.f));
 
         m[0][0] = a / aspect;
         m[0][1] = 0.f;