diff options
author | Tavian Barnes <tavianator@gmail.com> | 2009-11-17 18:32:39 -0500 |
---|---|---|
committer | Tavian Barnes <tavianator@gmail.com> | 2009-11-17 18:32:39 -0500 |
commit | 9f36c26a7f75a58564f60878c42381b451d7d7ba (patch) | |
tree | ec070dd2d2f7078bf3aebba4dade28d69043b375 /libdimension/dimension/geometry.h | |
parent | 54e1ad43c7629d85f88cefbecdfe3e60e8c42294 (diff) | |
download | dimension-9f36c26a7f75a58564f60878c42381b451d7d7ba.tar.xz |
Make finish callback a propper BRDF.
Diffstat (limited to 'libdimension/dimension/geometry.h')
-rw-r--r-- | libdimension/dimension/geometry.h | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/libdimension/dimension/geometry.h b/libdimension/dimension/geometry.h index 86a0111..08ac1b3 100644 --- a/libdimension/dimension/geometry.h +++ b/libdimension/dimension/geometry.h @@ -77,6 +77,14 @@ dmnsn_line_construct(dmnsn_vector x0, dmnsn_vector n) /* Vector and matrix arithmetic */ DMNSN_INLINE dmnsn_vector +dmnsn_vector_negate(dmnsn_vector rhs) +{ + /* 3 negations */ + dmnsn_vector v = { -rhs.x, -rhs.y, -rhs.z }; + return v; +} + +DMNSN_INLINE dmnsn_vector dmnsn_vector_add(dmnsn_vector lhs, dmnsn_vector rhs) { /* 3 additions */ |