switch (dim)
{
case 3:
- // take cross product between normals[0] and
- // normals[1]. write it in the current form to
- // make sure that compilers don't warn about
- // out-of-bounds accesses -- the warnings are
- // bogus since we get here only for dim==3, but
- // at least one isn't quite smart enough to
- // notice this and warns when compiling the
- // function in 2d
+ // take
+ // cross
+ // product
+ // between
+ // normals[0]
+ // and
+ // normals[1]. write
+ // it in
+ // the
+ // current
+ // form to
+ // make
+ // sure
+ // that
+ // compilers
+ // don't
+ // warn
+ // about
+ // out-of-bounds
+ // accesses
+ // -- the
+ // warnings
+ // are
+ // bogus
+ // since we
+ // get here
+ // only for
+ // dim==3,
+ // but at
+ // least
+ // one
+ // isn't
+ // quite
+ // smart
+ // enough
+ // to
+ // notice
+ // this and
+ // warns
+ // when
+ // compiling
+ // the
+ // function
+ // in 2d
cross_product (tangent, normals[0], normals[dim-2]);
break;
default:
In the beginning the Universe was created. This has made a lot of
people very angry and has been widely regarded as a bad move.
Douglas Adams