aboutsummaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorNicholas Noll <nbnoll@eml.cc>2020-04-28 21:31:01 -0700
committerNicholas Noll <nbnoll@eml.cc>2020-04-28 21:31:01 -0700
commit86134ccf82dcafe338e68c14e483ec98cfc94925 (patch)
treea5bae880fcd03e8de6393988ce5f6f2317eb9004 /include
parenta48e7f9fd525b4da828605fb7be4d2a35dde4e23 (diff)
struct: preparing for prototype of math library
Diffstat (limited to 'include')
-rw-r--r--include/libmath.h20
1 files changed, 20 insertions, 0 deletions
diff --git a/include/libmath.h b/include/libmath.h
new file mode 100644
index 0000000..03e8e1a
--- /dev/null
+++ b/include/libmath.h
@@ -0,0 +1,20 @@
+#pragma once
+
+// -----------------------------------------------------------------------
+// Linear algebra
+
+/*
+ * Vector (double precision)
+ * len : dimension of space
+ * inc : stride to access in buffer
+ * buf : pointer to start of data
+ * NOTE: minimum buffer size MUST be len*inc
+ */
+typedef struct math·Vecd
+{
+ int len;
+ int inc;
+ double *buf;
+} math·Vecd;
+
+double linalg·dotd(math·Vecd a, math·Vecd b);