about summary refs log tree commit diff
path: root/generator/pamtris/utils.h
blob: 8b945acd8ef1ffb36e61787fbfa0fdbc63f93546 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
#ifndef UTIL_H_INCLUDED
#define UTIL_H_INCLUDED

#include "fract.h"

void
gen_steps(const int32_t * begin,
          const int32_t * end,
          fract *         out,
          uint8_t         elements,
          int32_t         divisor);

void
step_up(fract *       vars,
        const fract * steps,
        uint8_t       elements,
        int32_t       divisor);

void
multi_step_up(fract *       vars,
              const fract * steps,
              uint8_t       elements,
              int32_t       times,
              int32_t       divisor);

void
fract_to_int32_array(const fract * in,
                     int32_t     * out,
                     uint8_t       elements);

void
int32_to_fract_array(const int32_t * in,
                     fract *         out,
                     uint8_t         elements);

void
sort3(uint8_t *       index_array,
      const int32_t * y_array,
      const int32_t * x_array);

#endif