Sign in
fuchsia
/
third_party
/
swig
/
refs/tags/v4.0.0
/
.
/
Examples
/
tcl
/
value
/
example.c
blob: 4ed2fe10ae731ca8e9984b5d363957716eb3d7a3 [
file
] [
log
] [
blame
]
/* File : example.c */
#include
"example.h"
double
dot_product
(
Vector
a
,
Vector
b
)
{
return
(
a
.
x
*
b
.
x
+
a
.
y
*
b
.
y
+
a
.
z
*
b
.
z
);
}
Vector
vector_add
(
Vector
a
,
Vector
b
)
{
Vector
r
;
r
.
x
=
a
.
x
+
b
.
x
;
r
.
y
=
a
.
y
+
b
.
y
;
r
.
z
=
a
.
z
+
b
.
z
;
return
r
;
}