Source

watches / lunar / sin_table.h

Full commit
/** \file
 * Approximate sin function.
 * theta goes from 0 == 0 Pi to 65536 == 2 Pi
 */
#ifndef _sin_table_h_
#define _sin_table_h_

#include <stdint.h>

extern int16_t sin_lookup(uint16_t theta);

static inline int16_t
cos_lookup(
	uint16_t theta
)
{
	return sin_lookup(theta + 16384);
}


#endif