/* * JoeyLib 3D * Copyright (C) 2019 Scott Duensing * * This software is provided 'as-is', without any express or implied * warranty. In no event will the authors be held liable for any damages * arising from the use of this software. * * Permission is granted to anyone to use this software for any purpose, * including commercial applications, and to alter it and redistribute it * freely, subject to the following restrictions: * * 1. The origin of this software must not be misrepresented; you must not * claim that you wrote the original software. If you use this software * in a product, an acknowledgment in the product documentation would be * appreciated but is not required. * 2. Altered source versions must be plainly marked as such, and must not be * misrepresented as being the original software. * 3. This notice may not be removed or altered from any source distribution. */ #ifndef H_J3DTBLS_ #define H_J3DTBLS_ static float sin_table[] = { 0.0000000, 0.0174524, 0.0348995, 0.0523360, 0.0697565, 0.0871557, 0.1045285, 0.1218693, 0.1391731, 0.1564345, 0.1736482, 0.1908090, 0.2079117, 0.2249510, 0.2419219, 0.2588190, 0.2756374, 0.2923717, 0.3090170, 0.3255682, 0.3420201, 0.3583679, 0.3746066, 0.3907311, 0.4067367, 0.4226182, 0.4383711, 0.4539905, 0.4694715, 0.4848096, 0.5000000, 0.5150381, 0.5299193, 0.5446390, 0.5591929, 0.5735764, 0.5877852, 0.6018150, 0.6156615, 0.6293204, 0.6427875, 0.6560590, 0.6691306, 0.6819983, 0.6946584, 0.7071068, 0.7193398, 0.7313537, 0.7431448, 0.7547096, 0.7660444, 0.7771459, 0.7880107, 0.7986355, 0.8090170, 0.8191520, 0.8290375, 0.8386706, 0.8480481, 0.8571673, 0.8660254, 0.8746197, 0.8829476, 0.8910065, 0.8987940, 0.9063077, 0.9135454, 0.9205048, 0.9271838, 0.9335804, 0.9396926, 0.9455185, 0.9510565, 0.9563047, 0.9612617, 0.9659258, 0.9702957, 0.9743700, 0.9781476, 0.9816272, 0.9848077, 0.9876883, 0.9902681, 0.9925461, 0.9945219, 0.9961947, 0.9975640, 0.9986295, 0.9993908, 0.9998477, 1.0000000, 0.9998477, 0.9993908, 0.9986295, 0.9975641, 0.9961947, 0.9945219, 0.9925462, 0.9902681, 0.9876883, 0.9848078, 0.9816272, 0.9781476, 0.9743701, 0.9702958, 0.9659258, 0.9612617, 0.9563048, 0.9510565, 0.9455186, 0.9396927, 0.9335805, 0.9271839, 0.9205049, 0.9135455, 0.9063079, 0.8987941, 0.8910066, 0.8829476, 0.8746197, 0.8660255, 0.8571673, 0.8480482, 0.8386707, 0.8290376, 0.8191522, 0.8090170, 0.7986356, 0.7880108, 0.7771460, 0.7660446, 0.7547096, 0.7431449, 0.7313537, 0.7193399, 0.7071068, 0.6946584, 0.6819985, 0.6691306, 0.6560591, 0.6427878, 0.6293205, 0.6156616, 0.6018151, 0.5877854, 0.5735765, 0.5591930, 0.5446392, 0.5299193, 0.5150382, 0.5000002, 0.4848097, 0.4694716, 0.4539906, 0.4383713, 0.4226183, 0.4067368, 0.3907314, 0.3746067, 0.3583679, 0.3420204, 0.3255683, 0.3090170, 0.2923718, 0.2756374, 0.2588189, 0.2419221, 0.2249513, 0.2079118, 0.1908090, 0.1736483, 0.1564344, 0.1391734, 0.1218695, 0.1045287, 0.0871559, 0.0697565, 0.0523360, 0.0348995, 0.0174527, 0.0000002, -0.0174522, -0.0348994, -0.0523357, -0.0697564, -0.0871558, -0.1045282, -0.1218692, -0.1391729, -0.1564344, -0.1736480, -0.1908089, -0.2079118, -0.2249508, -0.2419216, -0.2588188, -0.2756373, -0.2923715, -0.3090170, -0.3255678, -0.3420199, -0.3583677, -0.3746064, -0.3907311, -0.4067365, -0.4226183, -0.4383708, -0.4539903, -0.4694713, -0.4848095, -0.5000000, -0.5150380, -0.5299193, -0.5446388, -0.5591928, -0.5735762, -0.5877851, -0.6018150, -0.6156614, -0.6293201, -0.6427874, -0.6560589, -0.6691304, -0.6819983, -0.6946582, -0.7071067, -0.7193395, -0.7313535, -0.7431447, -0.7547094, -0.7660442, -0.7771460, -0.7880107, -0.7986354, -0.8090169, -0.8191518, -0.8290376, -0.8386705, -0.8480480, -0.8571672, -0.8660252, -0.8746195, -0.8829476, -0.8910064, -0.8987939, -0.9063078, -0.9135453, -0.9205048, -0.9271838, -0.9335803, -0.9396925, -0.9455186, -0.9510565, -0.9563047, -0.9612616, -0.9659257, -0.9702957, -0.9743700, -0.9781476, -0.9816272, -0.9848077, -0.9876883, -0.9902680, -0.9925461, -0.9945219, -0.9961947, -0.9975640, -0.9986295, -0.9993908, -0.9998477, -1.0000000, -0.9998477, -0.9993908, -0.9986295, -0.9975641, -0.9961947, -0.9945219, -0.9925462, -0.9902681, -0.9876883, -0.9848078, -0.9816272, -0.9781476, -0.9743701, -0.9702958, -0.9659258, -0.9612617, -0.9563048, -0.9510566, -0.9455187, -0.9396926, -0.9335805, -0.9271840, -0.9205048, -0.9135456, -0.9063080, -0.8987941, -0.8910066, -0.8829478, -0.8746197, -0.8660257, -0.8571674, -0.8480483, -0.8386708, -0.8290376, -0.8191521, -0.8090171, -0.7986357, -0.7880110, -0.7771463, -0.7660445, -0.7547097, -0.7431450, -0.7313537, -0.7193402, -0.7071069, -0.6946585, -0.6819986, -0.6691306, -0.6560591, -0.6427881, -0.6293206, -0.6156618, -0.6018154, -0.5877853, -0.5735766, -0.5591931, -0.5446390, -0.5299193, -0.5150382, -0.4999998, -0.4848103, -0.4694719, -0.4539909, -0.4383717, -0.4226185, -0.4067369, -0.3907315, -0.3746066, -0.3583681, -0.3420204, -0.3255680, -0.3090169, -0.2923718, -0.2756380, -0.2588197, -0.2419222, -0.2249515, -0.2079122, -0.1908092, -0.1736484, -0.1564348, -0.1391731, -0.1218694, -0.1045286, -0.0871560, -0.0697564, -0.0523360, -0.0349001, -0.0174531, -0.0000003 }; static float cos_table[] = { 1.0000000, 0.9998477, 0.9993908, 0.9986295, 0.9975641, 0.9961947, 0.9945219, 0.9925462, 0.9902681, 0.9876883, 0.9848078, 0.9816272, 0.9781476, 0.9743701, 0.9702957, 0.9659258, 0.9612617, 0.9563048, 0.9510565, 0.9455186, 0.9396926, 0.9335804, 0.9271839, 0.9205049, 0.9135455, 0.9063078, 0.8987941, 0.8910065, 0.8829476, 0.8746197, 0.8660254, 0.8571673, 0.8480481, 0.8386706, 0.8290376, 0.8191521, 0.8090170, 0.7986355, 0.7880108, 0.7771460, 0.7660445, 0.7547096, 0.7431449, 0.7313538, 0.7193398, 0.7071068, 0.6946584, 0.6819984, 0.6691306, 0.6560590, 0.6427877, 0.6293204, 0.6156615, 0.6018150, 0.5877853, 0.5735765, 0.5591929, 0.5446391, 0.5299193, 0.5150381, 0.5000001, 0.4848097, 0.4694716, 0.4539905, 0.4383712, 0.4226184, 0.4067367, 0.3907312, 0.3746066, 0.3583680, 0.3420203, 0.3255683, 0.3090171, 0.2923718, 0.2756374, 0.2588192, 0.2419219, 0.2249512, 0.2079118, 0.1908091, 0.1736483, 0.1564345, 0.1391731, 0.1218694, 0.1045285, 0.0871558, 0.0697566, 0.0523361, 0.0348995, 0.0174524, 0.0000001, -0.0174524, -0.0348995, -0.0523358, -0.0697564, -0.0871557, -0.1045285, -0.1218692, -0.1391731, -0.1564345, -0.1736481, -0.1908089, -0.2079116, -0.2249509, -0.2419218, -0.2588190, -0.2756374, -0.2923716, -0.3090169, -0.3255681, -0.3420200, -0.3583678, -0.3746065, -0.3907309, -0.4067366, -0.4226181, -0.4383711, -0.4539904, -0.4694716, -0.4848095, -0.4999998, -0.5150380, -0.5299191, -0.5446388, -0.5591928, -0.5735763, -0.5877852, -0.6018149, -0.6156615, -0.6293203, -0.6427874, -0.6560590, -0.6691305, -0.6819983, -0.6946583, -0.7071068, -0.7193397, -0.7313536, -0.7431448, -0.7547095, -0.7660443, -0.7771459, -0.7880106, -0.7986355, -0.8090169, -0.8191520, -0.8290375, -0.8386704, -0.8480481, -0.8571672, -0.8660253, -0.8746196, -0.8829476, -0.8910065, -0.8987940, -0.9063078, -0.9135454, -0.9205048, -0.9271838, -0.9335804, -0.9396925, -0.9455185, -0.9510565, -0.9563047, -0.9612617, -0.9659259, -0.9702957, -0.9743700, -0.9781476, -0.9816272, -0.9848077, -0.9876883, -0.9902680, -0.9925461, -0.9945219, -0.9961947, -0.9975641, -0.9986295, -0.9993908, -0.9998477, -1.0000000, -0.9998477, -0.9993908, -0.9986295, -0.9975641, -0.9961947, -0.9945219, -0.9925462, -0.9902681, -0.9876884, -0.9848078, -0.9816272, -0.9781476, -0.9743701, -0.9702958, -0.9659259, -0.9612617, -0.9563048, -0.9510565, -0.9455187, -0.9396927, -0.9335805, -0.9271839, -0.9205049, -0.9135455, -0.9063078, -0.8987942, -0.8910066, -0.8829477, -0.8746198, -0.8660254, -0.8571674, -0.8480481, -0.8386707, -0.8290377, -0.8191522, -0.8090171, -0.7986355, -0.7880108, -0.7771462, -0.7660446, -0.7547097, -0.7431450, -0.7313538, -0.7193399, -0.7071068, -0.6946587, -0.6819986, -0.6691307, -0.6560592, -0.6427879, -0.6293204, -0.6156615, -0.6018151, -0.5877854, -0.5735767, -0.5591929, -0.5446391, -0.5299194, -0.5150383, -0.5000003, -0.4848100, -0.4694716, -0.4539907, -0.4383714, -0.4226182, -0.4067371, -0.3907312, -0.3746068, -0.3583682, -0.3420205, -0.3255682, -0.3090171, -0.2923719, -0.2756377, -0.2588194, -0.2419219, -0.2249512, -0.2079119, -0.1908089, -0.1736486, -0.1564350, -0.1391733, -0.1218696, -0.1045288, -0.0871557, -0.0697565, -0.0523361, -0.0348998, -0.0174528, 0.0000000, 0.0174523, 0.0348993, 0.0523357, 0.0697561, 0.0871553, 0.1045284, 0.1218691, 0.1391728, 0.1564345, 0.1736477, 0.1908089, 0.2079115, 0.2249507, 0.2419215, 0.2588190, 0.2756372, 0.2923715, 0.3090167, 0.3255677, 0.3420201, 0.3583678, 0.3746064, 0.3907312, 0.4067362, 0.4226178, 0.4383710, 0.4539903, 0.4694712, 0.4848096, 0.4999995, 0.5150379, 0.5299190, 0.5446387, 0.5591929, 0.5735763, 0.5877851, 0.6018148, 0.6156612, 0.6293200, 0.6427875, 0.6560589, 0.6691304, 0.6819984, 0.6946580, 0.7071067, 0.7193396, 0.7313535, 0.7431448, 0.7547095, 0.7660440, 0.7771458, 0.7880105, 0.7986352, 0.8090169, 0.8191519, 0.8290374, 0.8386706, 0.8480481, 0.8571672, 0.8660255, 0.8746193, 0.8829474, 0.8910063, 0.8987938, 0.9063077, 0.9135453, 0.9205047, 0.9271838, 0.9335804, 0.9396925, 0.9455186, 0.9510565, 0.9563047, 0.9612615, 0.9659256, 0.9702956, 0.9743700, 0.9781475, 0.9816272, 0.9848077, 0.9876883, 0.9902681, 0.9925461, 0.9945219, 0.9961947, 0.9975641, 0.9986295, 0.9993908, 0.9998477, 1.0000000 }; #endif // H_J3DTBLS_