diff options
author | Tavian Barnes <tavianator@gmail.com> | 2011-11-17 18:58:53 -0500 |
---|---|---|
committer | Tavian Barnes <tavianator@gmail.com> | 2011-11-17 18:58:53 -0500 |
commit | 7c5e3e6b3fbe566cd739b6a1c3872eba68eb9380 (patch) | |
tree | 0818de21172d4f6c25535db63f3f65819b2b3b96 /libdimension/dimension/geometry.h | |
parent | c4d9fdefa0a4fec2ed1059a3b85a77914f68c39e (diff) | |
download | dimension-7c5e3e6b3fbe566cd739b6a1c3872eba68eb9380.tar.xz |
Get rid of dmnsn_vector_element().
Diffstat (limited to 'libdimension/dimension/geometry.h')
-rw-r--r-- | libdimension/dimension/geometry.h | 33 |
1 files changed, 0 insertions, 33 deletions
diff --git a/libdimension/dimension/geometry.h b/libdimension/dimension/geometry.h index 1248e01..80da735 100644 --- a/libdimension/dimension/geometry.h +++ b/libdimension/dimension/geometry.h @@ -229,39 +229,6 @@ dmnsn_infinite_bounding_box(void) return box; } -/* Vector element access */ - -/** Constants for indexing a vector like an array. */ -enum { - DMNSN_X, /**< The x component. */ - DMNSN_Y, /**< The y component. */ - DMNSN_Z /**< The z component. */ -}; - -/** - * Index a vector like an array. - * @param[in] n The vector to index. - * @param[in] elem Which element to access; one of \ref DMNSN_X, \ref DMNSN_Y, - * or \ref DMNSN_Z. - * @return The requested element. - */ -DMNSN_INLINE double -dmnsn_vector_element(dmnsn_vector n, int elem) -{ - switch (elem) { - case DMNSN_X: - return n.x; - case DMNSN_Y: - return n.y; - case DMNSN_Z: - return n.z; - - default: - dmnsn_assert(false, "Wrong vector element requested."); - return 0.0; - } -} - /* Vector and matrix arithmetic */ /** Negate a vector. */ |