1 /* libs/corecg/SkSinTable.h 2 ** 3 ** Copyright 2006, The Android Open Source Project 4 ** 5 ** Licensed under the Apache License, Version 2.0 (the "License"); 6 ** you may not use this file except in compliance with the License. 7 ** You may obtain a copy of the License at 8 ** 9 ** http://www.apache.org/licenses/LICENSE-2.0 10 ** 11 ** Unless required by applicable law or agreed to in writing, software 12 ** distributed under the License is distributed on an "AS IS" BASIS, 13 ** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 ** See the License for the specific language governing permissions and 15 ** limitations under the License. 16 */ 17 18 #ifndef SkSinTable_DEFINED 19 #define SkSinTable_DEFINED 20 21 #include "SkTypes.h" 22 23 /* Fixed point values (low 16 bits) of sin(radians) for 24 radians in [0...PI/2) 25 */ 26 static const uint16_t gSkSinTable[256] = { 27 0x0000, 28 0x0192, 29 0x0324, 30 0x04B6, 31 0x0648, 32 0x07DA, 33 0x096C, 34 0x0AFE, 35 0x0C8F, 36 0x0E21, 37 0x0FB2, 38 0x1144, 39 0x12D5, 40 0x1466, 41 0x15F6, 42 0x1787, 43 0x1917, 44 0x1AA7, 45 0x1C37, 46 0x1DC7, 47 0x1F56, 48 0x20E5, 49 0x2273, 50 0x2402, 51 0x2590, 52 0x271D, 53 0x28AA, 54 0x2A37, 55 0x2BC4, 56 0x2D50, 57 0x2EDB, 58 0x3066, 59 0x31F1, 60 0x337B, 61 0x3505, 62 0x368E, 63 0x3817, 64 0x399F, 65 0x3B26, 66 0x3CAD, 67 0x3E33, 68 0x3FB9, 69 0x413E, 70 0x42C3, 71 0x4447, 72 0x45CA, 73 0x474D, 74 0x48CE, 75 0x4A50, 76 0x4BD0, 77 0x4D50, 78 0x4ECF, 79 0x504D, 80 0x51CA, 81 0x5347, 82 0x54C3, 83 0x563E, 84 0x57B8, 85 0x5931, 86 0x5AAA, 87 0x5C22, 88 0x5D98, 89 0x5F0E, 90 0x6083, 91 0x61F7, 92 0x636A, 93 0x64DC, 94 0x664D, 95 0x67BD, 96 0x692D, 97 0x6A9B, 98 0x6C08, 99 0x6D74, 100 0x6EDF, 101 0x7049, 102 0x71B1, 103 0x7319, 104 0x7480, 105 0x75E5, 106 0x774A, 107 0x78AD, 108 0x7A0F, 109 0x7B70, 110 0x7CD0, 111 0x7E2E, 112 0x7F8B, 113 0x80E7, 114 0x8242, 115 0x839C, 116 0x84F4, 117 0x864B, 118 0x87A1, 119 0x88F5, 120 0x8A48, 121 0x8B9A, 122 0x8CEA, 123 0x8E39, 124 0x8F87, 125 0x90D3, 126 0x921E, 127 0x9368, 128 0x94B0, 129 0x95F6, 130 0x973C, 131 0x987F, 132 0x99C2, 133 0x9B02, 134 0x9C42, 135 0x9D7F, 136 0x9EBC, 137 0x9FF6, 138 0xA12F, 139 0xA267, 140 0xA39D, 141 0xA4D2, 142 0xA605, 143 0xA736, 144 0xA866, 145 0xA994, 146 0xAAC0, 147 0xABEB, 148 0xAD14, 149 0xAE3B, 150 0xAF61, 151 0xB085, 152 0xB1A8, 153 0xB2C8, 154 0xB3E7, 155 0xB504, 156 0xB620, 157 0xB73A, 158 0xB852, 159 0xB968, 160 0xBA7C, 161 0xBB8F, 162 0xBCA0, 163 0xBDAE, 164 0xBEBC, 165 0xBFC7, 166 0xC0D0, 167 0xC1D8, 168 0xC2DE, 169 0xC3E2, 170 0xC4E3, 171 0xC5E4, 172 0xC6E2, 173 0xC7DE, 174 0xC8D8, 175 0xC9D1, 176 0xCAC7, 177 0xCBBB, 178 0xCCAE, 179 0xCD9F, 180 0xCE8D, 181 0xCF7A, 182 0xD064, 183 0xD14D, 184 0xD233, 185 0xD318, 186 0xD3FA, 187 0xD4DB, 188 0xD5B9, 189 0xD695, 190 0xD770, 191 0xD848, 192 0xD91E, 193 0xD9F2, 194 0xDAC4, 195 0xDB94, 196 0xDC61, 197 0xDD2D, 198 0xDDF6, 199 0xDEBE, 200 0xDF83, 201 0xE046, 202 0xE106, 203 0xE1C5, 204 0xE282, 205 0xE33C, 206 0xE3F4, 207 0xE4AA, 208 0xE55E, 209 0xE60F, 210 0xE6BE, 211 0xE76B, 212 0xE816, 213 0xE8BF, 214 0xE965, 215 0xEA09, 216 0xEAAB, 217 0xEB4B, 218 0xEBE8, 219 0xEC83, 220 0xED1C, 221 0xEDB2, 222 0xEE46, 223 0xEED8, 224 0xEF68, 225 0xEFF5, 226 0xF080, 227 0xF109, 228 0xF18F, 229 0xF213, 230 0xF294, 231 0xF314, 232 0xF391, 233 0xF40B, 234 0xF484, 235 0xF4FA, 236 0xF56D, 237 0xF5DE, 238 0xF64D, 239 0xF6BA, 240 0xF724, 241 0xF78B, 242 0xF7F1, 243 0xF853, 244 0xF8B4, 245 0xF912, 246 0xF96E, 247 0xF9C7, 248 0xFA1E, 249 0xFA73, 250 0xFAC5, 251 0xFB14, 252 0xFB61, 253 0xFBAC, 254 0xFBF5, 255 0xFC3B, 256 0xFC7E, 257 0xFCBF, 258 0xFCFE, 259 0xFD3A, 260 0xFD74, 261 0xFDAB, 262 0xFDE0, 263 0xFE13, 264 0xFE43, 265 0xFE70, 266 0xFE9B, 267 0xFEC4, 268 0xFEEA, 269 0xFF0E, 270 0xFF2F, 271 0xFF4E, 272 0xFF6A, 273 0xFF84, 274 0xFF9C, 275 0xFFB1, 276 0xFFC3, 277 0xFFD3, 278 0xFFE1, 279 0xFFEC, 280 0xFFF4, 281 0xFFFB, 282 0xFFFE 283 }; 284 285 #endif 286