aboutsummaryrefslogtreecommitdiff
path: root/include/libmath.h
blob: 03e8e1a39a8c1c9b58d077983cf8157b45a6746d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
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);