optical/NxFuncs/closedriver/sintable.h

29 lines
544 B
C
Raw Normal View History

2025-09-04 01:45:08 +00:00
#ifndef __SINTABLE_H__
#define __SINTABLE_H__
#include "config.h"
#define TAB_SIZE1K 1000
#define TAB_SIZE2K 2000
#define TAB_SIZE4K 4000
#define TAB_SIZE256 256
#define TAB_SIZE1024 1024
#define TAB_SIZE4096 4096
#define USE_1DIV4_TAB 1 // <20>ķ<EFBFBD>֮һ<D6AE><D2BB><EFBFBD><EFBFBD>
#ifndef SIN_TAB_SIZE
#define SIN_TAB_SIZE TAB_SIZE4K // <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> (0 -- SIN_TAB_SIZE)
#endif
#define SIN_ITEM_MUTI 16384 // ֵ<><D6B5><EFBFBD><EFBFBD>Χ(-SIN_ITEM_MUTI -- SIN_ITEM_MUTI)
// <20><>ȡ<EFBFBD><C8A1><EFBFBD><EFBFBD>ֵ
// GetSinValue(i) = sin(i*2PI/SIN_TAB_SIZE) * SIN_ITEM_MUTI
int GetSinValue(int angidx);
#endif