projects
/
forks
/
cmath3d.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
9a58f05
)
symmetry in vadd4
author
James Alan Preiss
<jamesalanpreiss@gmail.com>
Thu, 14 Nov 2019 19:58:32 +0000
(11:58 -0800)
committer
GitHub
<noreply@github.com>
Thu, 14 Nov 2019 19:58:32 +0000
(11:58 -0800)
math3d.h
patch
|
blob
|
history
diff --git
a/math3d.h
b/math3d.h
index
ef6bd94
..
465f7f5
100644
(file)
--- a/
math3d.h
+++ b/
math3d.h
@@
-227,7
+227,7
@@
static inline struct vec vadd3(struct vec a, struct vec b, struct vec c) {
// add 4 vectors.
static inline struct vec vadd4(struct vec a, struct vec b, struct vec c, struct vec d) {
// TODO: make sure it compiles to optimal code
- return vadd(vadd(
vadd(a, b), c), d
);
+ return vadd(vadd(
a, b), vadd(c, d)
);
}
// subtract b and c from a.
static inline struct vec vsub2(struct vec a, struct vec b, struct vec c) {