Revision: 70422 http://sourceforge.net/p/brlcad/code/70422 Author: brlcad Date: 2017-11-21 07:31:32 +0000 (Tue, 21 Nov 2017) Log Message: ----------- yet another manual vector inverse. this isn't exactly equivalent due to different near-zero tolerances being used, but should be close enough for ebm.
Modified Paths: -------------- brlcad/trunk/src/librt/primitives/ebm/ebm.c Modified: brlcad/trunk/src/librt/primitives/ebm/ebm.c =================================================================== --- brlcad/trunk/src/librt/primitives/ebm/ebm.c 2017-11-21 06:50:19 UTC (rev 70421) +++ brlcad/trunk/src/librt/primitives/ebm/ebm.c 2017-11-21 07:31:32 UTC (rev 70422) @@ -325,25 +325,8 @@ int out_index; int j; - /* Compute the inverse of the direction cosines */ - if (!ZERO(rp->r_dir[X])) { - invdir[X] = 1.0/rp->r_dir[X]; - } else { - invdir[X] = INFINITY; - rp->r_dir[X] = 0.0; - } - if (!ZERO(rp->r_dir[Y])) { - invdir[Y] = 1.0/rp->r_dir[Y]; - } else { - invdir[Y] = INFINITY; - rp->r_dir[Y] = 0.0; - } - if (!ZERO(rp->r_dir[Z])) { - invdir[Z] = 1.0/rp->r_dir[Z]; - } else { - invdir[Z] = INFINITY; - rp->r_dir[Z] = 0.0; - } + /* Compute inverse of the direction cosines */ + VINVDIR(invdir, rp->r_dir); /* intersect ray with ideal grid rpp */ VSETALL(P, 0); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. ------------------------------------------------------------------------------ Check out the vibrant tech community on one of the world's most engaging tech sites, Slashdot.org! http://sdm.link/slashdot _______________________________________________ BRL-CAD Source Commits mailing list brlcad-commits@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/brlcad-commits