85536ab717
Trigonometry support. * include/grub/trig.h: New file. * lib/trig.c: Likewise. * maintainance/gentrigtables.py: Likewise. * conf/common.rmk (pkglib_MODULES): Add trig.mod. (trig_mod_SOURCES): New variable. (trig_mod_CFLAGS): Likewise. (trig_mod_LDFLAGS): Likewise.
83 lines
4.1 KiB
C
83 lines
4.1 KiB
C
/* trig.c - Trigonometric table definitions. */
|
|
/*
|
|
* GRUB -- GRand Unified Bootloader
|
|
* Copyright (C) 2008 Free Software Foundation, Inc.
|
|
*
|
|
* GRUB is free software: you can redistribute it and/or modify
|
|
* it under the terms of the GNU General Public License as published by
|
|
* the Free Software Foundation, either version 3 of the License, or
|
|
* (at your option) any later version.
|
|
*
|
|
* GRUB is distributed in the hope that it will be useful,
|
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
* GNU General Public License for more details.
|
|
*
|
|
* You should have received a copy of the GNU General Public License
|
|
* along with GRUB. If not, see <http://www.gnu.org/licenses/>.
|
|
*/
|
|
|
|
#include <grub/trig.h>
|
|
|
|
/* These tables were generated with `gentrigtables.py'. */
|
|
|
|
short grub_trig_sintab[] =
|
|
{
|
|
0,402,804,1205,1606,2006,2404,2801,3196,3590,
|
|
3981,4370,4756,5139,5520,5897,6270,6639,7005,7366,
|
|
7723,8076,8423,8765,9102,9434,9760,10080,10394,10702,
|
|
11003,11297,11585,11866,12140,12406,12665,12916,13160,13395,
|
|
13623,13842,14053,14256,14449,14635,14811,14978,15137,15286,
|
|
15426,15557,15679,15791,15893,15986,16069,16143,16207,16261,
|
|
16305,16340,16364,16379,16384,16379,16364,16340,16305,16261,
|
|
16207,16143,16069,15986,15893,15791,15679,15557,15426,15286,
|
|
15137,14978,14811,14635,14449,14256,14053,13842,13623,13395,
|
|
13160,12916,12665,12406,12140,11866,11585,11297,11003,10702,
|
|
10394,10080,9760,9434,9102,8765,8423,8076,7723,7366,
|
|
7005,6639,6270,5897,5520,5139,4756,4370,3981,3590,
|
|
3196,2801,2404,2006,1606,1205,804,402,0,-402,
|
|
-804,-1205,-1606,-2006,-2404,-2801,-3196,-3590,-3981,-4370,
|
|
-4756,-5139,-5520,-5897,-6270,-6639,-7005,-7366,-7723,-8076,
|
|
-8423,-8765,-9102,-9434,-9760,-10080,-10394,-10702,-11003,-11297,
|
|
-11585,-11866,-12140,-12406,-12665,-12916,-13160,-13395,-13623,-13842,
|
|
-14053,-14256,-14449,-14635,-14811,-14978,-15137,-15286,-15426,-15557,
|
|
-15679,-15791,-15893,-15986,-16069,-16143,-16207,-16261,-16305,-16340,
|
|
-16364,-16379,-16384,-16379,-16364,-16340,-16305,-16261,-16207,-16143,
|
|
-16069,-15986,-15893,-15791,-15679,-15557,-15426,-15286,-15137,-14978,
|
|
-14811,-14635,-14449,-14256,-14053,-13842,-13623,-13395,-13160,-12916,
|
|
-12665,-12406,-12140,-11866,-11585,-11297,-11003,-10702,-10394,-10080,
|
|
-9760,-9434,-9102,-8765,-8423,-8076,-7723,-7366,-7005,-6639,
|
|
-6270,-5897,-5520,-5139,-4756,-4370,-3981,-3590,-3196,-2801,
|
|
-2404,-2006,-1606,-1205,-804,-402
|
|
};
|
|
|
|
short grub_trig_costab[] =
|
|
{
|
|
16384,16379,16364,16340,16305,16261,16207,16143,16069,15986,
|
|
15893,15791,15679,15557,15426,15286,15137,14978,14811,14635,
|
|
14449,14256,14053,13842,13623,13395,13160,12916,12665,12406,
|
|
12140,11866,11585,11297,11003,10702,10394,10080,9760,9434,
|
|
9102,8765,8423,8076,7723,7366,7005,6639,6270,5897,
|
|
5520,5139,4756,4370,3981,3590,3196,2801,2404,2006,
|
|
1606,1205,804,402,0,-402,-804,-1205,-1606,-2006,
|
|
-2404,-2801,-3196,-3590,-3981,-4370,-4756,-5139,-5520,-5897,
|
|
-6270,-6639,-7005,-7366,-7723,-8076,-8423,-8765,-9102,-9434,
|
|
-9760,-10080,-10394,-10702,-11003,-11297,-11585,-11866,-12140,-12406,
|
|
-12665,-12916,-13160,-13395,-13623,-13842,-14053,-14256,-14449,-14635,
|
|
-14811,-14978,-15137,-15286,-15426,-15557,-15679,-15791,-15893,-15986,
|
|
-16069,-16143,-16207,-16261,-16305,-16340,-16364,-16379,-16384,-16379,
|
|
-16364,-16340,-16305,-16261,-16207,-16143,-16069,-15986,-15893,-15791,
|
|
-15679,-15557,-15426,-15286,-15137,-14978,-14811,-14635,-14449,-14256,
|
|
-14053,-13842,-13623,-13395,-13160,-12916,-12665,-12406,-12140,-11866,
|
|
-11585,-11297,-11003,-10702,-10394,-10080,-9760,-9434,-9102,-8765,
|
|
-8423,-8076,-7723,-7366,-7005,-6639,-6270,-5897,-5520,-5139,
|
|
-4756,-4370,-3981,-3590,-3196,-2801,-2404,-2006,-1606,-1205,
|
|
-804,-402,0,402,804,1205,1606,2006,2404,2801,
|
|
3196,3590,3981,4370,4756,5139,5520,5897,6270,6639,
|
|
7005,7366,7723,8076,8423,8765,9102,9434,9760,10080,
|
|
10394,10702,11003,11297,11585,11866,12140,12406,12665,12916,
|
|
13160,13395,13623,13842,14053,14256,14449,14635,14811,14978,
|
|
15137,15286,15426,15557,15679,15791,15893,15986,16069,16143,
|
|
16207,16261,16305,16340,16364,16379
|
|
};
|
|
|