diff options
author | Tavian Barnes <tavianator@gmail.com> | 2009-07-01 20:07:12 +0000 |
---|---|---|
committer | Tavian Barnes <tavianator@gmail.com> | 2009-07-01 20:07:12 +0000 |
commit | 219fc9ac99e2c24acea011d7845a22d6b3700f75 (patch) | |
tree | 9532ecc162dd317fa47d841e2b77e3044e022976 /libdimension/geometry.c | |
parent | 74a94dd492f9bcabf442e3f0c89dbb7cf8463cf8 (diff) | |
download | dimension-219fc9ac99e2c24acea011d7845a22d6b3700f75.tar.xz |
Inline some functions: about a 5% performance boost.
Diffstat (limited to 'libdimension/geometry.c')
-rw-r--r-- | libdimension/geometry.c | 14 |
1 files changed, 0 insertions, 14 deletions
diff --git a/libdimension/geometry.c b/libdimension/geometry.c index 01345cf..030cd68 100644 --- a/libdimension/geometry.c +++ b/libdimension/geometry.c @@ -336,20 +336,6 @@ dmnsn_matrix_vector_mul(dmnsn_matrix lhs, dmnsn_vector rhs) return dmnsn_vector_div(r, w); } -/* Affine line transformation; n = lhs*(x0 + n) - lhs*x0, x0 *= lhs */ -dmnsn_line -dmnsn_matrix_line_mul(dmnsn_matrix lhs, dmnsn_line rhs) -{ - /* 24 multiplications, 6 divisions, 30 additions */ - dmnsn_line l; - l.x0 = dmnsn_matrix_vector_mul(lhs, rhs.x0); - l.n = dmnsn_vector_sub( - dmnsn_matrix_vector_mul(lhs, dmnsn_vector_add(rhs.x0, rhs.n)), - l.x0 - ); - return l; -} - /* Solve for the t value such that x0 + t*n = x */ double dmnsn_line_index(dmnsn_line l, dmnsn_vector x) |