projects
/
physik
/
posic.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
tests ...
[physik/posic.git]
/
math
/
math.c
diff --git
a/math/math.c
b/math/math.c
index
6f4345e
..
54d79fd
100644
(file)
--- a/
math/math.c
+++ b/
math/math.c
@@
-66,6
+66,11
@@
int v3_cmp(t_3dvec *a,t_3dvec *b) {
return(memcmp(a,b,sizeof(t_3dvec)));
}
return(memcmp(a,b,sizeof(t_3dvec)));
}
+double v3_scalar_product(t_3dvec *a,t_3dvec *b) {
+
+ return(a->x*b->x+a->y*b->y+a->z*b->z);
+}
+
double v3_absolute_square(t_3dvec *a) {
return(a->x*a->x+a->y*a->y+a->z*a->z);
double v3_absolute_square(t_3dvec *a) {
return(a->x*a->x+a->y*a->y+a->z*a->z);