-
Notifications
You must be signed in to change notification settings - Fork 4
Expand file tree
/
Copy pathSaw2048Int.h
More file actions
140 lines (137 loc) · 10.2 KB
/
Saw2048Int.h
File metadata and controls
140 lines (137 loc) · 10.2 KB
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
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
/*
* Contains table of sawtooth wave
*/
const int16_t sawInt[] = {
-2046,-2044,-2042,-2040,-2038,-2036,-2034,-2032,-2030,-2028,-2026,-2024,-2022,-2020,-2018,-2016,
-2014,-2012,-2010,-2008,-2006,-2004,-2002,-2000,-1998,-1996,-1994,-1992,-1990,-1988,-1986,-1984,
-1982,-1980,-1978,-1976,-1974,-1972,-1970,-1968,-1966,-1964,-1962,-1960,-1958,-1956,-1954,-1952,
-1950,-1948,-1946,-1944,-1942,-1940,-1938,-1936,-1934,-1932,-1930,-1928,-1926,-1924,-1922,-1920,
-1918,-1916,-1914,-1912,-1910,-1908,-1906,-1904,-1902,-1900,-1898,-1896,-1894,-1892,-1890,-1888,
-1886,-1884,-1882,-1880,-1878,-1876,-1874,-1872,-1870,-1868,-1866,-1864,-1862,-1860,-1858,-1856,
-1854,-1852,-1850,-1848,-1846,-1844,-1842,-1840,-1838,-1836,-1834,-1832,-1830,-1828,-1826,-1824,
-1822,-1820,-1818,-1816,-1814,-1812,-1810,-1808,-1806,-1804,-1802,-1800,-1798,-1796,-1794,-1792,
-1790,-1788,-1786,-1784,-1782,-1780,-1778,-1776,-1774,-1772,-1770,-1768,-1766,-1764,-1762,-1760,
-1758,-1756,-1754,-1752,-1750,-1748,-1746,-1744,-1742,-1740,-1738,-1736,-1734,-1732,-1730,-1728,
-1726,-1724,-1722,-1720,-1718,-1716,-1714,-1712,-1710,-1708,-1706,-1704,-1702,-1700,-1698,-1696,
-1694,-1692,-1690,-1688,-1686,-1684,-1682,-1680,-1678,-1676,-1674,-1672,-1670,-1668,-1666,-1664,
-1662,-1660,-1658,-1656,-1654,-1652,-1650,-1648,-1646,-1644,-1642,-1640,-1638,-1636,-1634,-1632,
-1630,-1628,-1626,-1624,-1622,-1620,-1618,-1616,-1614,-1612,-1610,-1608,-1606,-1604,-1602,-1600,
-1598,-1596,-1594,-1592,-1590,-1588,-1586,-1584,-1582,-1580,-1578,-1576,-1574,-1572,-1570,-1568,
-1566,-1564,-1562,-1560,-1558,-1556,-1554,-1552,-1550,-1548,-1546,-1544,-1542,-1540,-1538,-1536,
-1534,-1532,-1530,-1528,-1526,-1524,-1522,-1520,-1518,-1516,-1514,-1512,-1510,-1508,-1506,-1504,
-1502,-1500,-1498,-1496,-1494,-1492,-1490,-1488,-1486,-1484,-1482,-1480,-1478,-1476,-1474,-1472,
-1470,-1468,-1466,-1464,-1462,-1460,-1458,-1456,-1454,-1452,-1450,-1448,-1446,-1444,-1442,-1440,
-1438,-1436,-1434,-1432,-1430,-1428,-1426,-1424,-1422,-1420,-1418,-1416,-1414,-1412,-1410,-1408,
-1406,-1404,-1402,-1400,-1398,-1396,-1394,-1392,-1390,-1388,-1386,-1384,-1382,-1380,-1378,-1376,
-1374,-1372,-1370,-1368,-1366,-1364,-1362,-1360,-1358,-1356,-1354,-1352,-1350,-1348,-1346,-1344,
-1342,-1340,-1338,-1336,-1334,-1332,-1330,-1328,-1326,-1324,-1322,-1320,-1318,-1316,-1314,-1312,
-1310,-1308,-1306,-1304,-1302,-1300,-1298,-1296,-1294,-1292,-1290,-1288,-1286,-1284,-1282,-1280,
-1278,-1276,-1274,-1272,-1270,-1268,-1266,-1264,-1262,-1260,-1258,-1256,-1254,-1252,-1250,-1248,
-1246,-1244,-1242,-1240,-1238,-1236,-1234,-1232,-1230,-1228,-1226,-1224,-1222,-1220,-1218,-1216,
-1214,-1212,-1210,-1208,-1206,-1204,-1202,-1200,-1198,-1196,-1194,-1192,-1190,-1188,-1186,-1184,
-1182,-1180,-1178,-1176,-1174,-1172,-1170,-1168,-1166,-1164,-1162,-1160,-1158,-1156,-1154,-1152,
-1150,-1148,-1146,-1144,-1142,-1140,-1138,-1136,-1134,-1132,-1130,-1128,-1126,-1124,-1122,-1120,
-1118,-1116,-1114,-1112,-1110,-1108,-1106,-1104,-1102,-1100,-1098,-1096,-1094,-1092,-1090,-1088,
-1086,-1084,-1082,-1080,-1078,-1076,-1074,-1072,-1070,-1068,-1066,-1064,-1062,-1060,-1058,-1056,
-1054,-1052,-1050,-1048,-1046,-1044,-1042,-1040,-1038,-1036,-1034,-1032,-1030,-1028,-1026,-1024,
-1022,-1020,-1018,-1016,-1014,-1012,-1010,-1008,-1006,-1004,-1002,-1000,-998,-996,-994,-992,
-990,-988,-986,-984,-982,-980,-978,-976,-974,-972,-970,-968,-966,-964,-962,-960,
-958,-956,-954,-952,-950,-948,-946,-944,-942,-940,-938,-936,-934,-932,-930,-928,
-926,-924,-922,-920,-918,-916,-914,-912,-910,-908,-906,-904,-902,-900,-898,-896,
-894,-892,-890,-888,-886,-884,-882,-880,-878,-876,-874,-872,-870,-868,-866,-864,
-862,-860,-858,-856,-854,-852,-850,-848,-846,-844,-842,-840,-838,-836,-834,-832,
-830,-828,-826,-824,-822,-820,-818,-816,-814,-812,-810,-808,-806,-804,-802,-800,
-798,-796,-794,-792,-790,-788,-786,-784,-782,-780,-778,-776,-774,-772,-770,-768,
-766,-764,-762,-760,-758,-756,-754,-752,-750,-748,-746,-744,-742,-740,-738,-736,
-734,-732,-730,-728,-726,-724,-722,-720,-718,-716,-714,-712,-710,-708,-706,-704,
-702,-700,-698,-696,-694,-692,-690,-688,-686,-684,-682,-680,-678,-676,-674,-672,
-670,-668,-666,-664,-662,-660,-658,-656,-654,-652,-650,-648,-646,-644,-642,-640,
-638,-636,-634,-632,-630,-628,-626,-624,-622,-620,-618,-616,-614,-612,-610,-608,
-606,-604,-602,-600,-598,-596,-594,-592,-590,-588,-586,-584,-582,-580,-578,-576,
-574,-572,-570,-568,-566,-564,-562,-560,-558,-556,-554,-552,-550,-548,-546,-544,
-542,-540,-538,-536,-534,-532,-530,-528,-526,-524,-522,-520,-518,-516,-514,-512,
-510,-508,-506,-504,-502,-500,-498,-496,-494,-492,-490,-488,-486,-484,-482,-480,
-478,-476,-474,-472,-470,-468,-466,-464,-462,-460,-458,-456,-454,-452,-450,-448,
-446,-444,-442,-440,-438,-436,-434,-432,-430,-428,-426,-424,-422,-420,-418,-416,
-414,-412,-410,-408,-406,-404,-402,-400,-398,-396,-394,-392,-390,-388,-386,-384,
-382,-380,-378,-376,-374,-372,-370,-368,-366,-364,-362,-360,-358,-356,-354,-352,
-350,-348,-346,-344,-342,-340,-338,-336,-334,-332,-330,-328,-326,-324,-322,-320,
-318,-316,-314,-312,-310,-308,-306,-304,-302,-300,-298,-296,-294,-292,-290,-288,
-286,-284,-282,-280,-278,-276,-274,-272,-270,-268,-266,-264,-262,-260,-258,-256,
-254,-252,-250,-248,-246,-244,-242,-240,-238,-236,-234,-232,-230,-228,-226,-224,
-222,-220,-218,-216,-214,-212,-210,-208,-206,-204,-202,-200,-198,-196,-194,-192,
-190,-188,-186,-184,-182,-180,-178,-176,-174,-172,-170,-168,-166,-164,-162,-160,
-158,-156,-154,-152,-150,-148,-146,-144,-142,-140,-138,-136,-134,-132,-130,-128,
-126,-124,-122,-120,-118,-116,-114,-112,-110,-108,-106,-104,-102,-100,-98,-96,
-94,-92,-90,-88,-86,-84,-82,-80,-78,-76,-74,-72,-70,-68,-66,-64,
-62,-60,-58,-56,-54,-52,-50,-48,-46,-44,-42,-40,-38,-36,-34,-32,
-30,-28,-26,-24,-22,-20,-18,-16,-14,-12,-10,-8,-6,-4,-2,0,
1,2,4,6,8,10,12,14,16,18,20,22,24,26,28,30,
32,34,36,38,40,42,44,46,48,50,52,54,56,58,60,62,
64,66,68,70,72,74,76,78,80,82,84,86,88,90,92,94,
96,98,100,102,104,106,108,110,112,114,116,118,120,122,124,126,
128,130,132,134,136,138,140,142,144,146,148,150,152,154,156,158,
160,162,164,166,168,170,172,174,176,178,180,182,184,186,188,190,
192,194,196,198,200,202,204,206,208,210,212,214,216,218,220,222,
224,226,228,230,232,234,236,238,240,242,244,246,248,250,252,254,
256,258,260,262,264,266,268,270,272,274,276,278,280,282,284,286,
288,290,292,294,296,298,300,302,304,306,308,310,312,314,316,318,
320,322,324,326,328,330,332,334,336,338,340,342,344,346,348,350,
352,354,356,358,360,362,364,366,368,370,372,374,376,378,380,382,
384,386,388,390,392,394,396,398,400,402,404,406,408,410,412,414,
416,418,420,422,424,426,428,430,432,434,436,438,440,442,444,446,
448,450,452,454,456,458,460,462,464,466,468,470,472,474,476,478,
480,482,484,486,488,490,492,494,496,498,500,502,504,506,508,510,
512,514,516,518,520,522,524,526,528,530,532,534,536,538,540,542,
544,546,548,550,552,554,556,558,560,562,564,566,568,570,572,574,
576,578,580,582,584,586,588,590,592,594,596,598,600,602,604,606,
608,610,612,614,616,618,620,622,624,626,628,630,632,634,636,638,
640,642,644,646,648,650,652,654,656,658,660,662,664,666,668,670,
672,674,676,678,680,682,684,686,688,690,692,694,696,698,700,702,
704,706,708,710,712,714,716,718,720,722,724,726,728,730,732,734,
736,738,740,742,744,746,748,750,752,754,756,758,760,762,764,766,
768,770,772,774,776,778,780,782,784,786,788,790,792,794,796,798,
800,802,804,806,808,810,812,814,816,818,820,822,824,826,828,830,
832,834,836,838,840,842,844,846,848,850,852,854,856,858,860,862,
864,866,868,870,872,874,876,878,880,882,884,886,888,890,892,894,
896,898,900,902,904,906,908,910,912,914,916,918,920,922,924,926,
928,930,932,934,936,938,940,942,944,946,948,950,952,954,956,958,
960,962,964,966,968,970,972,974,976,978,980,982,984,986,988,990,
992,994,996,998,1000,1002,1004,1006,1008,1010,1012,1014,1016,1018,1020,1022,
1024,1026,1028,1030,1032,1034,1036,1038,1040,1042,1044,1046,1048,1050,1052,1054,
1056,1058,1060,1062,1064,1066,1068,1070,1072,1074,1076,1078,1080,1082,1084,1086,
1088,1090,1092,1094,1096,1098,1100,1102,1104,1106,1108,1110,1112,1114,1116,1118,
1120,1122,1124,1126,1128,1130,1132,1134,1136,1138,1140,1142,1144,1146,1148,1150,
1152,1154,1156,1158,1160,1162,1164,1166,1168,1170,1172,1174,1176,1178,1180,1182,
1184,1186,1188,1190,1192,1194,1196,1198,1200,1202,1204,1206,1208,1210,1212,1214,
1216,1218,1220,1222,1224,1226,1228,1230,1232,1234,1236,1238,1240,1242,1244,1246,
1248,1250,1252,1254,1256,1258,1260,1262,1264,1266,1268,1270,1272,1274,1276,1278,
1280,1282,1284,1286,1288,1290,1292,1294,1296,1298,1300,1302,1304,1306,1308,1310,
1312,1314,1316,1318,1320,1322,1324,1326,1328,1330,1332,1334,1336,1338,1340,1342,
1344,1346,1348,1350,1352,1354,1356,1358,1360,1362,1364,1366,1368,1370,1372,1374,
1376,1378,1380,1382,1384,1386,1388,1390,1392,1394,1396,1398,1400,1402,1404,1406,
1408,1410,1412,1414,1416,1418,1420,1422,1424,1426,1428,1430,1432,1434,1436,1438,
1440,1442,1444,1446,1448,1450,1452,1454,1456,1458,1460,1462,1464,1466,1468,1470,
1472,1474,1476,1478,1480,1482,1484,1486,1488,1490,1492,1494,1496,1498,1500,1502,
1504,1506,1508,1510,1512,1514,1516,1518,1520,1522,1524,1526,1528,1530,1532,1534,
1536,1538,1540,1542,1544,1546,1548,1550,1552,1554,1556,1558,1560,1562,1564,1566,
1568,1570,1572,1574,1576,1578,1580,1582,1584,1586,1588,1590,1592,1594,1596,1598,
1600,1602,1604,1606,1608,1610,1612,1614,1616,1618,1620,1622,1624,1626,1628,1630,
1632,1634,1636,1638,1640,1642,1644,1646,1648,1650,1652,1654,1656,1658,1660,1662,
1664,1666,1668,1670,1672,1674,1676,1678,1680,1682,1684,1686,1688,1690,1692,1694,
1696,1698,1700,1702,1704,1706,1708,1710,1712,1714,1716,1718,1720,1722,1724,1726,
1728,1730,1732,1734,1736,1738,1740,1742,1744,1746,1748,1750,1752,1754,1756,1758,
1760,1762,1764,1766,1768,1770,1772,1774,1776,1778,1780,1782,1784,1786,1788,1790,
1792,1794,1796,1798,1800,1802,1804,1806,1808,1810,1812,1814,1816,1818,1820,1822,
1824,1826,1828,1830,1832,1834,1836,1838,1840,1842,1844,1846,1848,1850,1852,1854,
1856,1858,1860,1862,1864,1866,1868,1870,1872,1874,1876,1878,1880,1882,1884,1886,
1888,1890,1892,1894,1896,1898,1900,1902,1904,1906,1908,1910,1912,1914,1916,1918,
1920,1922,1924,1926,1928,1930,1932,1934,1936,1938,1940,1942,1944,1946,1948,1950,
1952,1954,1956,1958,1960,1962,1964,1966,1968,1970,1972,1974,1976,1978,1980,1982,
1984,1986,1988,1990,1992,1994,1996,1998,2000,2002,2004,2006,2008,2010,2012,2014,
2016,2018,2020,2022,2024,2026,2028,2030,2032,2034,2036,2038,2040,2042,2044,2046
};
int32_t getSawInt(uint32_t index)
{
return sawInt[index];
}