/usr/share/gtk-doc/html/cogl/cogl-Fixed-Point-API.html is in libcogl-doc 1.10.2-7.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
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 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 646 647 648 649 650 651 652 653 654 655 656 657 658 659 660 661 662 663 664 665 666 667 668 669 670 671 672 673 674 675 676 677 678 679 680 681 682 683 684 685 686 687 688 689 690 691 692 693 694 695 696 697 698 699 700 701 702 703 704 705 706 707 708 709 710 711 712 713 714 715 716 717 718 719 720 721 722 723 724 725 726 727 728 729 730 731 732 733 734 735 736 737 738 739 740 741 742 743 744 745 746 747 748 749 750 751 752 753 754 755 756 757 758 759 760 761 762 763 764 765 766 767 768 769 770 771 772 773 774 775 776 777 778 779 780 781 782 783 784 785 786 787 788 789 790 791 792 793 794 795 796 797 798 799 800 801 802 803 804 805 806 807 808 809 810 811 812 813 814 815 816 817 818 819 820 821 822 823 824 825 826 827 828 829 830 831 832 833 834 835 836 837 838 839 840 841 842 843 844 845 846 847 848 849 850 851 852 853 854 855 856 857 858 859 860 861 862 863 864 865 866 867 868 869 870 871 872 873 874 875 876 877 878 879 880 881 882 883 884 885 886 887 888 889 890 891 892 893 894 895 896 897 898 899 900 901 902 903 904 905 906 907 908 909 910 911 912 913 914 915 916 917 918 919 920 921 922 923 924 925 926 927 928 929 930 931 932 933 934 935 936 937 938 939 940 941 942 943 944 945 946 947 948 949 950 951 952 953 954 955 956 957 958 959 960 961 962 963 964 965 966 967 968 969 970 971 972 973 974 975 976 977 978 979 980 981 982 983 984 985 986 987 988 989 990 991 992 993 994 995 996 997 998 999 1000 1001 1002 1003 1004 1005 1006 1007 1008 1009 1010 1011 1012 1013 1014 1015 1016 1017 1018 1019 1020 1021 1022 1023 1024 1025 1026 1027 1028 1029 1030 1031 1032 1033 1034 1035 1036 1037 1038 1039 1040 1041 1042 1043 1044 1045 1046 1047 1048 1049 1050 1051 1052 1053 1054 1055 1056 1057 1058 1059 1060 1061 1062 1063 1064 1065 1066 1067 1068 1069 1070 1071 1072 1073 1074 1075 1076 1077 1078 1079 1080 1081 1082 1083 1084 1085 1086 1087 1088 1089 1090 1091 1092 1093 1094 1095 1096 1097 1098 1099 1100 1101 1102 1103 1104 1105 1106 1107 1108 1109 1110 1111 1112 1113 1114 1115 1116 1117 1118 1119 1120 1121 1122 1123 1124 1125 1126 1127 1128 1129 1130 1131 1132 1133 1134 1135 1136 1137 1138 1139 1140 1141 1142 1143 1144 1145 1146 1147 1148 1149 1150 1151 1152 1153 1154 1155 1156 1157 1158 1159 1160 1161 1162 1163 1164 1165 1166 1167 1168 1169 1170 1171 1172 1173 1174 1175 1176 1177 1178 1179 1180 1181 1182 1183 1184 1185 1186 | <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Fixed Point API</title>
<meta name="generator" content="DocBook XSL Stylesheets V1.76.1">
<link rel="home" href="index.html" title="Cogl Reference Manual">
<link rel="up" href="ch01.html" title="Cogl - a modern 3D graphics API">
<link rel="prev" href="cogl-Bitmaps.html" title="Bitmaps">
<link rel="next" href="cogl-GType-Integration-API.html" title="GType Integration API">
<meta name="generator" content="GTK-Doc V1.18 (XML mode)">
<link rel="stylesheet" href="style.css" type="text/css">
</head>
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
<table class="navigation" id="top" width="100%" summary="Navigation header" cellpadding="2" cellspacing="2">
<tr valign="middle">
<td><a accesskey="p" href="cogl-Bitmaps.html"><img src="left.png" width="24" height="24" border="0" alt="Prev"></a></td>
<td><a accesskey="u" href="ch01.html"><img src="up.png" width="24" height="24" border="0" alt="Up"></a></td>
<td><a accesskey="h" href="index.html"><img src="home.png" width="24" height="24" border="0" alt="Home"></a></td>
<th width="100%" align="center">Cogl Reference Manual</th>
<td><a accesskey="n" href="cogl-GType-Integration-API.html"><img src="right.png" width="24" height="24" border="0" alt="Next"></a></td>
</tr>
<tr><td colspan="5" class="shortcuts">
<a href="#cogl-Fixed-Point-API.synopsis" class="shortcut">Top</a>
|
<a href="#cogl-Fixed-Point-API.description" class="shortcut">Description</a>
</td></tr>
</table>
<div class="refentry">
<a name="cogl-Fixed-Point-API"></a><div class="titlepage"></div>
<div class="refnamediv"><table width="100%"><tr>
<td valign="top">
<h2><span class="refentrytitle"><a name="cogl-Fixed-Point-API.top_of_page"></a>Fixed Point API</span></h2>
<p>Fixed Point API — Fixed Point API</p>
</td>
<td valign="top" align="right"></td>
</tr></table></div>
<div class="refsynopsisdiv">
<a name="cogl-Fixed-Point-API.synopsis"></a><h2>Synopsis</h2>
<pre class="synopsis">typedef <a class="link" href="cogl-Fixed-Point-API.html#CoglFixed" title="CoglFixed">CoglFixed</a>;
#define <a class="link" href="cogl-Fixed-Point-API.html#COGL-FIXED-BITS:CAPS" title="COGL_FIXED_BITS">COGL_FIXED_BITS</a>
#define <a class="link" href="cogl-Fixed-Point-API.html#COGL-FIXED-Q:CAPS" title="COGL_FIXED_Q">COGL_FIXED_Q</a>
#define <a class="link" href="cogl-Fixed-Point-API.html#COGL-FIXED-MAX:CAPS" title="COGL_FIXED_MAX">COGL_FIXED_MAX</a>
#define <a class="link" href="cogl-Fixed-Point-API.html#COGL-FIXED-MIN:CAPS" title="COGL_FIXED_MIN">COGL_FIXED_MIN</a>
#define <a class="link" href="cogl-Fixed-Point-API.html#COGL-FIXED-FROM-FLOAT:CAPS" title="COGL_FIXED_FROM_FLOAT()">COGL_FIXED_FROM_FLOAT</a> (x)
#define <a class="link" href="cogl-Fixed-Point-API.html#COGL-FIXED-TO-FLOAT:CAPS" title="COGL_FIXED_TO_FLOAT()">COGL_FIXED_TO_FLOAT</a> (x)
#define <a class="link" href="cogl-Fixed-Point-API.html#COGL-FIXED-FROM-INT:CAPS" title="COGL_FIXED_FROM_INT()">COGL_FIXED_FROM_INT</a> (x)
#define <a class="link" href="cogl-Fixed-Point-API.html#COGL-FIXED-TO-INT:CAPS" title="COGL_FIXED_TO_INT()">COGL_FIXED_TO_INT</a> (x)
#define <a class="link" href="cogl-Fixed-Point-API.html#COGL-FIXED-FROM-DOUBLE:CAPS" title="COGL_FIXED_FROM_DOUBLE()">COGL_FIXED_FROM_DOUBLE</a> (x)
#define <a class="link" href="cogl-Fixed-Point-API.html#COGL-FIXED-TO-DOUBLE:CAPS" title="COGL_FIXED_TO_DOUBLE()">COGL_FIXED_TO_DOUBLE</a> (x)
#define <a class="link" href="cogl-Fixed-Point-API.html#COGL-FLOAT-TO-INT:CAPS" title="COGL_FLOAT_TO_INT()">COGL_FLOAT_TO_INT</a> (x)
#define <a class="link" href="cogl-Fixed-Point-API.html#COGL-FLOAT-TO-UINT:CAPS" title="COGL_FLOAT_TO_UINT()">COGL_FLOAT_TO_UINT</a> (x)
#define <a class="link" href="cogl-Fixed-Point-API.html#COGL-FIXED-EPSILON:CAPS" title="COGL_FIXED_EPSILON">COGL_FIXED_EPSILON</a>
#define <a class="link" href="cogl-Fixed-Point-API.html#COGL-FIXED-1:CAPS" title="COGL_FIXED_1">COGL_FIXED_1</a>
#define <a class="link" href="cogl-Fixed-Point-API.html#COGL-FIXED-0-5:CAPS" title="COGL_FIXED_0_5">COGL_FIXED_0_5</a>
#define <a class="link" href="cogl-Fixed-Point-API.html#COGL-FIXED-30:CAPS" title="COGL_FIXED_30">COGL_FIXED_30</a>
#define <a class="link" href="cogl-Fixed-Point-API.html#COGL-FIXED-45:CAPS" title="COGL_FIXED_45">COGL_FIXED_45</a>
#define <a class="link" href="cogl-Fixed-Point-API.html#COGL-FIXED-60:CAPS" title="COGL_FIXED_60">COGL_FIXED_60</a>
#define <a class="link" href="cogl-Fixed-Point-API.html#COGL-FIXED-90:CAPS" title="COGL_FIXED_90">COGL_FIXED_90</a>
#define <a class="link" href="cogl-Fixed-Point-API.html#COGL-FIXED-120:CAPS" title="COGL_FIXED_120">COGL_FIXED_120</a>
#define <a class="link" href="cogl-Fixed-Point-API.html#COGL-FIXED-180:CAPS" title="COGL_FIXED_180">COGL_FIXED_180</a>
#define <a class="link" href="cogl-Fixed-Point-API.html#COGL-FIXED-240:CAPS" title="COGL_FIXED_240">COGL_FIXED_240</a>
#define <a class="link" href="cogl-Fixed-Point-API.html#COGL-FIXED-255:CAPS" title="COGL_FIXED_255">COGL_FIXED_255</a>
#define <a class="link" href="cogl-Fixed-Point-API.html#COGL-FIXED-270:CAPS" title="COGL_FIXED_270">COGL_FIXED_270</a>
#define <a class="link" href="cogl-Fixed-Point-API.html#COGL-FIXED-360:CAPS" title="COGL_FIXED_360">COGL_FIXED_360</a>
#define <a class="link" href="cogl-Fixed-Point-API.html#COGL-FIXED-MUL:CAPS" title="COGL_FIXED_MUL()">COGL_FIXED_MUL</a> (a,
b)
#define <a class="link" href="cogl-Fixed-Point-API.html#COGL-FIXED-DIV:CAPS" title="COGL_FIXED_DIV()">COGL_FIXED_DIV</a> (a,
b)
#define <a class="link" href="cogl-Fixed-Point-API.html#COGL-FIXED-MUL-DIV:CAPS" title="COGL_FIXED_MUL_DIV()">COGL_FIXED_MUL_DIV</a> (a,
b,
c)
#define <a class="link" href="cogl-Fixed-Point-API.html#COGL-FIXED-FAST-DIV:CAPS" title="COGL_FIXED_FAST_DIV()">COGL_FIXED_FAST_DIV</a> (a,
b)
#define <a class="link" href="cogl-Fixed-Point-API.html#COGL-FIXED-FAST-MUL:CAPS" title="COGL_FIXED_FAST_MUL()">COGL_FIXED_FAST_MUL</a> (a,
b)
#define <a class="link" href="cogl-Fixed-Point-API.html#COGL-FIXED-FRACTION:CAPS" title="COGL_FIXED_FRACTION()">COGL_FIXED_FRACTION</a> (x)
#define <a class="link" href="cogl-Fixed-Point-API.html#COGL-FIXED-FLOOR:CAPS" title="COGL_FIXED_FLOOR()">COGL_FIXED_FLOOR</a> (x)
#define <a class="link" href="cogl-Fixed-Point-API.html#COGL-FIXED-CEIL:CAPS" title="COGL_FIXED_CEIL()">COGL_FIXED_CEIL</a> (x)
#define <a class="link" href="cogl-Fixed-Point-API.html#COGL-FIXED-2-PI:CAPS" title="COGL_FIXED_2_PI">COGL_FIXED_2_PI</a>
#define <a class="link" href="cogl-Fixed-Point-API.html#COGL-FIXED-PI:CAPS" title="COGL_FIXED_PI">COGL_FIXED_PI</a>
#define <a class="link" href="cogl-Fixed-Point-API.html#COGL-FIXED-PI-2:CAPS" title="COGL_FIXED_PI_2">COGL_FIXED_PI_2</a>
#define <a class="link" href="cogl-Fixed-Point-API.html#COGL-FIXED-PI-4:CAPS" title="COGL_FIXED_PI_4">COGL_FIXED_PI_4</a>
#define <a class="link" href="cogl-Fixed-Point-API.html#COGL-RADIANS-TO-DEGREES:CAPS" title="COGL_RADIANS_TO_DEGREES">COGL_RADIANS_TO_DEGREES</a>
#define <a class="link" href="cogl-Fixed-Point-API.html#COGL-SQRTI-ARG-10-PERCENT:CAPS" title="COGL_SQRTI_ARG_10_PERCENT">COGL_SQRTI_ARG_10_PERCENT</a>
#define <a class="link" href="cogl-Fixed-Point-API.html#COGL-SQRTI-ARG-5-PERCENT:CAPS" title="COGL_SQRTI_ARG_5_PERCENT">COGL_SQRTI_ARG_5_PERCENT</a>
#define <a class="link" href="cogl-Fixed-Point-API.html#COGL-SQRTI-ARG-MAX:CAPS" title="COGL_SQRTI_ARG_MAX">COGL_SQRTI_ARG_MAX</a>
<span class="returnvalue">int</span> <a class="link" href="cogl-Fixed-Point-API.html#cogl-sqrti" title="cogl_sqrti ()">cogl_sqrti</a> (<em class="parameter"><code><span class="type">int</span> x</code></em>);
<a class="link" href="cogl-Fixed-Point-API.html#CoglFixed" title="CoglFixed"><span class="returnvalue">CoglFixed</span></a> <a class="link" href="cogl-Fixed-Point-API.html#cogl-fixed-atan2" title="cogl_fixed_atan2 ()">cogl_fixed_atan2</a> (<em class="parameter"><code><a class="link" href="cogl-Fixed-Point-API.html#CoglFixed" title="CoglFixed"><span class="type">CoglFixed</span></a> a</code></em>,
<em class="parameter"><code><a class="link" href="cogl-Fixed-Point-API.html#CoglFixed" title="CoglFixed"><span class="type">CoglFixed</span></a> b</code></em>);
<a class="link" href="cogl-Fixed-Point-API.html#CoglFixed" title="CoglFixed"><span class="returnvalue">CoglFixed</span></a> <a class="link" href="cogl-Fixed-Point-API.html#cogl-fixed-atan" title="cogl_fixed_atan ()">cogl_fixed_atan</a> (<em class="parameter"><code><a class="link" href="cogl-Fixed-Point-API.html#CoglFixed" title="CoglFixed"><span class="type">CoglFixed</span></a> a</code></em>);
<a class="link" href="cogl-Fixed-Point-API.html#CoglFixed" title="CoglFixed"><span class="returnvalue">CoglFixed</span></a> <a class="link" href="cogl-Fixed-Point-API.html#cogl-fixed-cos" title="cogl_fixed_cos ()">cogl_fixed_cos</a> (<em class="parameter"><code><a class="link" href="cogl-Fixed-Point-API.html#CoglFixed" title="CoglFixed"><span class="type">CoglFixed</span></a> angle</code></em>);
<a class="link" href="cogl-Fixed-Point-API.html#CoglFixed" title="CoglFixed"><span class="returnvalue">CoglFixed</span></a> <a class="link" href="cogl-Fixed-Point-API.html#cogl-fixed-log2" title="cogl_fixed_log2 ()">cogl_fixed_log2</a> (<em class="parameter"><code>unsigned <span class="type">int</span> x</code></em>);
unsigned <span class="returnvalue">int</span> <a class="link" href="cogl-Fixed-Point-API.html#cogl-fixed-pow" title="cogl_fixed_pow ()">cogl_fixed_pow</a> (<em class="parameter"><code>unsigned <span class="type">int</span> x</code></em>,
<em class="parameter"><code><a class="link" href="cogl-Fixed-Point-API.html#CoglFixed" title="CoglFixed"><span class="type">CoglFixed</span></a> y</code></em>);
unsigned <span class="returnvalue">int</span> <a class="link" href="cogl-Fixed-Point-API.html#cogl-fixed-pow2" title="cogl_fixed_pow2 ()">cogl_fixed_pow2</a> (<em class="parameter"><code><a class="link" href="cogl-Fixed-Point-API.html#CoglFixed" title="CoglFixed"><span class="type">CoglFixed</span></a> x</code></em>);
<a class="link" href="cogl-Fixed-Point-API.html#CoglFixed" title="CoglFixed"><span class="returnvalue">CoglFixed</span></a> <a class="link" href="cogl-Fixed-Point-API.html#cogl-fixed-sin" title="cogl_fixed_sin ()">cogl_fixed_sin</a> (<em class="parameter"><code><a class="link" href="cogl-Fixed-Point-API.html#CoglFixed" title="CoglFixed"><span class="type">CoglFixed</span></a> angle</code></em>);
<a class="link" href="cogl-Fixed-Point-API.html#CoglFixed" title="CoglFixed"><span class="returnvalue">CoglFixed</span></a> <a class="link" href="cogl-Fixed-Point-API.html#cogl-fixed-sqrt" title="cogl_fixed_sqrt ()">cogl_fixed_sqrt</a> (<em class="parameter"><code><a class="link" href="cogl-Fixed-Point-API.html#CoglFixed" title="CoglFixed"><span class="type">CoglFixed</span></a> x</code></em>);
<a class="link" href="cogl-Fixed-Point-API.html#CoglFixed" title="CoglFixed"><span class="returnvalue">CoglFixed</span></a> <a class="link" href="cogl-Fixed-Point-API.html#cogl-fixed-tan" title="cogl_fixed_tan ()">cogl_fixed_tan</a> (<em class="parameter"><code><a class="link" href="cogl-Fixed-Point-API.html#CoglFixed" title="CoglFixed"><span class="type">CoglFixed</span></a> angle</code></em>);
<a class="link" href="cogl-Fixed-Point-API.html#CoglFixed" title="CoglFixed"><span class="returnvalue">CoglFixed</span></a> <a class="link" href="cogl-Fixed-Point-API.html#cogl-fixed-div" title="cogl_fixed_div ()">cogl_fixed_div</a> (<em class="parameter"><code><a class="link" href="cogl-Fixed-Point-API.html#CoglFixed" title="CoglFixed"><span class="type">CoglFixed</span></a> a</code></em>,
<em class="parameter"><code><a class="link" href="cogl-Fixed-Point-API.html#CoglFixed" title="CoglFixed"><span class="type">CoglFixed</span></a> b</code></em>);
<a class="link" href="cogl-Fixed-Point-API.html#CoglFixed" title="CoglFixed"><span class="returnvalue">CoglFixed</span></a> <a class="link" href="cogl-Fixed-Point-API.html#cogl-fixed-mul" title="cogl_fixed_mul ()">cogl_fixed_mul</a> (<em class="parameter"><code><a class="link" href="cogl-Fixed-Point-API.html#CoglFixed" title="CoglFixed"><span class="type">CoglFixed</span></a> a</code></em>,
<em class="parameter"><code><a class="link" href="cogl-Fixed-Point-API.html#CoglFixed" title="CoglFixed"><span class="type">CoglFixed</span></a> b</code></em>);
<a class="link" href="cogl-Fixed-Point-API.html#CoglFixed" title="CoglFixed"><span class="returnvalue">CoglFixed</span></a> <a class="link" href="cogl-Fixed-Point-API.html#cogl-fixed-mul-div" title="cogl_fixed_mul_div ()">cogl_fixed_mul_div</a> (<em class="parameter"><code><a class="link" href="cogl-Fixed-Point-API.html#CoglFixed" title="CoglFixed"><span class="type">CoglFixed</span></a> a</code></em>,
<em class="parameter"><code><a class="link" href="cogl-Fixed-Point-API.html#CoglFixed" title="CoglFixed"><span class="type">CoglFixed</span></a> b</code></em>,
<em class="parameter"><code><a class="link" href="cogl-Fixed-Point-API.html#CoglFixed" title="CoglFixed"><span class="type">CoglFixed</span></a> c</code></em>);
typedef <a class="link" href="cogl-Fixed-Point-API.html#CoglAngle" title="CoglAngle">CoglAngle</a>;
#define <a class="link" href="cogl-Fixed-Point-API.html#COGL-ANGLE-FROM-DEG:CAPS" title="COGL_ANGLE_FROM_DEG()">COGL_ANGLE_FROM_DEG</a> (x)
#define <a class="link" href="cogl-Fixed-Point-API.html#COGL-ANGLE-FROM-DEGX:CAPS" title="COGL_ANGLE_FROM_DEGX()">COGL_ANGLE_FROM_DEGX</a> (x)
#define <a class="link" href="cogl-Fixed-Point-API.html#COGL-ANGLE-TO-DEG:CAPS" title="COGL_ANGLE_TO_DEG()">COGL_ANGLE_TO_DEG</a> (x)
#define <a class="link" href="cogl-Fixed-Point-API.html#COGL-ANGLE-TO-DEGX:CAPS" title="COGL_ANGLE_TO_DEGX()">COGL_ANGLE_TO_DEGX</a> (x)
<a class="link" href="cogl-Fixed-Point-API.html#CoglFixed" title="CoglFixed"><span class="returnvalue">CoglFixed</span></a> <a class="link" href="cogl-Fixed-Point-API.html#cogl-angle-cos" title="cogl_angle_cos ()">cogl_angle_cos</a> (<em class="parameter"><code><a class="link" href="cogl-Fixed-Point-API.html#CoglAngle" title="CoglAngle"><span class="type">CoglAngle</span></a> angle</code></em>);
<a class="link" href="cogl-Fixed-Point-API.html#CoglFixed" title="CoglFixed"><span class="returnvalue">CoglFixed</span></a> <a class="link" href="cogl-Fixed-Point-API.html#cogl-angle-sin" title="cogl_angle_sin ()">cogl_angle_sin</a> (<em class="parameter"><code><a class="link" href="cogl-Fixed-Point-API.html#CoglAngle" title="CoglAngle"><span class="type">CoglAngle</span></a> angle</code></em>);
<a class="link" href="cogl-Fixed-Point-API.html#CoglFixed" title="CoglFixed"><span class="returnvalue">CoglFixed</span></a> <a class="link" href="cogl-Fixed-Point-API.html#cogl-angle-tan" title="cogl_angle_tan ()">cogl_angle_tan</a> (<em class="parameter"><code><a class="link" href="cogl-Fixed-Point-API.html#CoglAngle" title="CoglAngle"><span class="type">CoglAngle</span></a> angle</code></em>);
</pre>
</div>
<div class="refsect1">
<a name="cogl-Fixed-Point-API.description"></a><h2>Description</h2>
<p>
COGL has a fixed point API targeted at platforms without a floating
point unit, such as embedded devices. On such platforms this API should
be preferred to the floating point one as it does not trigger the slow
path of software emulation, relying on integer math for fixed-to-floating
and floating-to-fixed notations conversion.
</p>
<p>
It is not recommened for use on platforms with a floating point unit
(e.g. desktop systems), nor for use in language bindings.
</p>
<p>
Basic rules of Fixed Point arithmethic:
</p>
<div class="itemizedlist"><ul class="itemizedlist" type="disc">
<li class="listitem"><p>Two fixed point numbers can be directly added, subtracted and
have their modulus taken.</p></li>
<li class="listitem"><p>To add other numerical type to a fixed point number it has to
be first converted to fixed point.</p></li>
<li class="listitem"><p>A fixed point number can be directly multiplied or divided by
an integer.</p></li>
<li class="listitem"><p>Two fixed point numbers can only be multiplied and divided by
the provided <a class="link" href="cogl-Fixed-Point-API.html#COGL-FIXED-MUL:CAPS" title="COGL_FIXED_MUL()"><code class="literal">COGL_FIXED_MUL</code></a> and <a class="link" href="cogl-Fixed-Point-API.html#COGL-FIXED-DIV:CAPS" title="COGL_FIXED_DIV()"><code class="literal">COGL_FIXED_DIV</code></a> macros.</p></li>
</ul></div>
<p>
</p>
<p>
The fixed point API is available since COGL 1.0.
</p>
</div>
<div class="refsect1">
<a name="cogl-Fixed-Point-API.details"></a><h2>Details</h2>
<div class="refsect2">
<a name="CoglFixed"></a><h3>CoglFixed</h3>
<pre class="programlisting">typedef gint32 CoglFixed;
</pre>
<p>
Fixed point number using a (16.16) notation.
</p>
</div>
<hr>
<div class="refsect2">
<a name="COGL-FIXED-BITS:CAPS"></a><h3>COGL_FIXED_BITS</h3>
<pre class="programlisting">#define COGL_FIXED_BITS (32)
</pre>
<p>
Evaluates to the number of bits used by the <a class="link" href="cogl-Fixed-Point-API.html#CoglFixed" title="CoglFixed"><span class="type">CoglFixed</span></a> type.
</p>
<p class="since">Since 1.0</p>
</div>
<hr>
<div class="refsect2">
<a name="COGL-FIXED-Q:CAPS"></a><h3>COGL_FIXED_Q</h3>
<pre class="programlisting">#define COGL_FIXED_Q (COGL_FIXED_BITS - 16)
</pre>
<p>
Evaluates to the number of bits used for the non-integer part
of the <a class="link" href="cogl-Fixed-Point-API.html#CoglFixed" title="CoglFixed"><span class="type">CoglFixed</span></a> type.
</p>
<p class="since">Since 1.0</p>
</div>
<hr>
<div class="refsect2">
<a name="COGL-FIXED-MAX:CAPS"></a><h3>COGL_FIXED_MAX</h3>
<pre class="programlisting">#define COGL_FIXED_MAX (0x7fffffff)
</pre>
<p>
The biggest number representable using <a class="link" href="cogl-Fixed-Point-API.html#CoglFixed" title="CoglFixed"><span class="type">CoglFixed</span></a>
</p>
<p class="since">Since 1.0</p>
</div>
<hr>
<div class="refsect2">
<a name="COGL-FIXED-MIN:CAPS"></a><h3>COGL_FIXED_MIN</h3>
<pre class="programlisting">#define COGL_FIXED_MIN (0x80000000)
</pre>
<p>
The smallest number representable using <a class="link" href="cogl-Fixed-Point-API.html#CoglFixed" title="CoglFixed"><span class="type">CoglFixed</span></a>
</p>
<p class="since">Since 1.0</p>
</div>
<hr>
<div class="refsect2">
<a name="COGL-FIXED-FROM-FLOAT:CAPS"></a><h3>COGL_FIXED_FROM_FLOAT()</h3>
<pre class="programlisting">#define COGL_FIXED_FROM_FLOAT(x) ((float) cogl_double_to_fixed (x))
</pre>
<p>
Converts <em class="parameter"><code>x</code></em> from a floating point to a fixed point notation.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody><tr>
<td><p><span class="term"><em class="parameter"><code>x</code></em> :</span></p></td>
<td>a floating point number</td>
</tr></tbody>
</table></div>
<p class="since">Since 1.0</p>
</div>
<hr>
<div class="refsect2">
<a name="COGL-FIXED-TO-FLOAT:CAPS"></a><h3>COGL_FIXED_TO_FLOAT()</h3>
<pre class="programlisting">#define COGL_FIXED_TO_FLOAT(x) ((float) ((int)(x) / 65536.0))
</pre>
<p>
Converts <em class="parameter"><code>x</code></em> from a fixed point to a floating point notation, in
single precision.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody><tr>
<td><p><span class="term"><em class="parameter"><code>x</code></em> :</span></p></td>
<td>a <a class="link" href="cogl-Fixed-Point-API.html#CoglFixed" title="CoglFixed"><span class="type">CoglFixed</span></a> number</td>
</tr></tbody>
</table></div>
<p class="since">Since 1.0</p>
</div>
<hr>
<div class="refsect2">
<a name="COGL-FIXED-FROM-INT:CAPS"></a><h3>COGL_FIXED_FROM_INT()</h3>
<pre class="programlisting">#define COGL_FIXED_FROM_INT(x) ((x) << COGL_FIXED_Q)
</pre>
<p>
Converts <em class="parameter"><code>x</code></em> from an integer to a fixed point notation.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody><tr>
<td><p><span class="term"><em class="parameter"><code>x</code></em> :</span></p></td>
<td>an integer number</td>
</tr></tbody>
</table></div>
<p class="since">Since 1.0</p>
</div>
<hr>
<div class="refsect2">
<a name="COGL-FIXED-TO-INT:CAPS"></a><h3>COGL_FIXED_TO_INT()</h3>
<pre class="programlisting">#define COGL_FIXED_TO_INT(x) ((x) >> COGL_FIXED_Q)
</pre>
<p>
Converts <em class="parameter"><code>x</code></em> from a fixed point notation to an integer, dropping
the fractional part without rounding.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody><tr>
<td><p><span class="term"><em class="parameter"><code>x</code></em> :</span></p></td>
<td>a <a class="link" href="cogl-Fixed-Point-API.html#CoglFixed" title="CoglFixed"><span class="type">CoglFixed</span></a> number</td>
</tr></tbody>
</table></div>
<p class="since">Since 1.0</p>
</div>
<hr>
<div class="refsect2">
<a name="COGL-FIXED-FROM-DOUBLE:CAPS"></a><h3>COGL_FIXED_FROM_DOUBLE()</h3>
<pre class="programlisting">#define COGL_FIXED_FROM_DOUBLE(x) (cogl_double_to_fixed (x))
</pre>
<p>
Converts <em class="parameter"><code>x</code></em> from a double precision, floating point to a fixed
point notation.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody><tr>
<td><p><span class="term"><em class="parameter"><code>x</code></em> :</span></p></td>
<td>a floating point number</td>
</tr></tbody>
</table></div>
<p class="since">Since 1.0</p>
</div>
<hr>
<div class="refsect2">
<a name="COGL-FIXED-TO-DOUBLE:CAPS"></a><h3>COGL_FIXED_TO_DOUBLE()</h3>
<pre class="programlisting">#define COGL_FIXED_TO_DOUBLE(x) ((double) ((int)(x) / 65536.0))
</pre>
<p>
Converts <em class="parameter"><code>x</code></em> from a fixed point to a floating point notation, in
double precision.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody><tr>
<td><p><span class="term"><em class="parameter"><code>x</code></em> :</span></p></td>
<td>a <a class="link" href="cogl-Fixed-Point-API.html#CoglFixed" title="CoglFixed"><span class="type">CoglFixed</span></a> number</td>
</tr></tbody>
</table></div>
<p class="since">Since 1.0</p>
</div>
<hr>
<div class="refsect2">
<a name="COGL-FLOAT-TO-INT:CAPS"></a><h3>COGL_FLOAT_TO_INT()</h3>
<pre class="programlisting">#define COGL_FLOAT_TO_INT(x) (cogl_double_to_int ((x)))
</pre>
<p>
Converts <em class="parameter"><code>x</code></em> from a floating point notation to a signed integer.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody><tr>
<td><p><span class="term"><em class="parameter"><code>x</code></em> :</span></p></td>
<td>a floatint point number</td>
</tr></tbody>
</table></div>
<p class="since">Since 1.0</p>
</div>
<hr>
<div class="refsect2">
<a name="COGL-FLOAT-TO-UINT:CAPS"></a><h3>COGL_FLOAT_TO_UINT()</h3>
<pre class="programlisting">#define COGL_FLOAT_TO_UINT(x) (cogl_double_to_uint ((x)))
</pre>
<p>
Converts <em class="parameter"><code>x</code></em> from a floating point notation to an unsigned integer.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody><tr>
<td><p><span class="term"><em class="parameter"><code>x</code></em> :</span></p></td>
<td>a floatint point number</td>
</tr></tbody>
</table></div>
<p class="since">Since 1.0</p>
</div>
<hr>
<div class="refsect2">
<a name="COGL-FIXED-EPSILON:CAPS"></a><h3>COGL_FIXED_EPSILON</h3>
<pre class="programlisting">#define COGL_FIXED_EPSILON (1)
</pre>
<p>
A very small number expressed as a <a class="link" href="cogl-Fixed-Point-API.html#CoglFixed" title="CoglFixed"><span class="type">CoglFixed</span></a> number.
</p>
<p class="since">Since 1.0</p>
</div>
<hr>
<div class="refsect2">
<a name="COGL-FIXED-1:CAPS"></a><h3>COGL_FIXED_1</h3>
<pre class="programlisting">#define COGL_FIXED_1 (1 << COGL_FIXED_Q)
</pre>
<p>
The number 1 expressed as a <a class="link" href="cogl-Fixed-Point-API.html#CoglFixed" title="CoglFixed"><span class="type">CoglFixed</span></a> number.
</p>
<p class="since">Since 1.0</p>
</div>
<hr>
<div class="refsect2">
<a name="COGL-FIXED-0-5:CAPS"></a><h3>COGL_FIXED_0_5</h3>
<pre class="programlisting">#define COGL_FIXED_0_5 (32768)
</pre>
<p>
The number 0.5 expressed as a <a class="link" href="cogl-Fixed-Point-API.html#CoglFixed" title="CoglFixed"><span class="type">CoglFixed</span></a> number.
</p>
<p class="since">Since 1.0</p>
</div>
<hr>
<div class="refsect2">
<a name="COGL-FIXED-30:CAPS"></a><h3>COGL_FIXED_30</h3>
<pre class="programlisting">#define COGL_FIXED_30 (COGL_FIXED_FROM_INT (30))
</pre>
<p>
Evaluates to the number 30 in fixed point notation.
</p>
<p class="since">Since 1.0</p>
</div>
<hr>
<div class="refsect2">
<a name="COGL-FIXED-45:CAPS"></a><h3>COGL_FIXED_45</h3>
<pre class="programlisting">#define COGL_FIXED_45 (COGL_FIXED_FROM_INT (45))
</pre>
<p>
Evaluates to the number 45 in fixed point notation.
</p>
<p class="since">Since 1.0</p>
</div>
<hr>
<div class="refsect2">
<a name="COGL-FIXED-60:CAPS"></a><h3>COGL_FIXED_60</h3>
<pre class="programlisting">#define COGL_FIXED_60 (COGL_FIXED_FROM_INT (60))
</pre>
<p>
Evaluates to the number 60 in fixed point notation.
</p>
<p class="since">Since 1.0</p>
</div>
<hr>
<div class="refsect2">
<a name="COGL-FIXED-90:CAPS"></a><h3>COGL_FIXED_90</h3>
<pre class="programlisting">#define COGL_FIXED_90 (COGL_FIXED_FROM_INT (90))
</pre>
<p>
Evaluates to the number 90 in fixed point notation.
</p>
<p class="since">Since 1.0</p>
</div>
<hr>
<div class="refsect2">
<a name="COGL-FIXED-120:CAPS"></a><h3>COGL_FIXED_120</h3>
<pre class="programlisting">#define COGL_FIXED_120 (COGL_FIXED_FROM_INT (120))
</pre>
<p>
Evaluates to the number 120 in fixed point notation.
</p>
<p class="since">Since 1.0</p>
</div>
<hr>
<div class="refsect2">
<a name="COGL-FIXED-180:CAPS"></a><h3>COGL_FIXED_180</h3>
<pre class="programlisting">#define COGL_FIXED_180 (COGL_FIXED_FROM_INT (180))
</pre>
<p>
Evaluates to the number 180 in fixed point notation.
</p>
<p class="since">Since 1.0</p>
</div>
<hr>
<div class="refsect2">
<a name="COGL-FIXED-240:CAPS"></a><h3>COGL_FIXED_240</h3>
<pre class="programlisting">#define COGL_FIXED_240 (COGL_FIXED_FROM_INT (240))
</pre>
<p>
Evaluates to the number 240 in fixed point notation.
</p>
<p class="since">Since 1.0</p>
</div>
<hr>
<div class="refsect2">
<a name="COGL-FIXED-255:CAPS"></a><h3>COGL_FIXED_255</h3>
<pre class="programlisting">#define COGL_FIXED_255 (COGL_FIXED_FROM_INT (255))
</pre>
<p>
Evaluates to the number 255 in fixed point notation.
</p>
<p class="since">Since 1.0</p>
</div>
<hr>
<div class="refsect2">
<a name="COGL-FIXED-270:CAPS"></a><h3>COGL_FIXED_270</h3>
<pre class="programlisting">#define COGL_FIXED_270 (COGL_FIXED_FROM_INT (270))
</pre>
<p>
Evaluates to the number 270 in fixed point notation.
</p>
<p class="since">Since 1.0</p>
</div>
<hr>
<div class="refsect2">
<a name="COGL-FIXED-360:CAPS"></a><h3>COGL_FIXED_360</h3>
<pre class="programlisting">#define COGL_FIXED_360 (COGL_FIXED_FROM_INT (360))
</pre>
<p>
Evaluates to the number 360 in fixed point notation.
</p>
<p class="since">Since 1.0</p>
</div>
<hr>
<div class="refsect2">
<a name="COGL-FIXED-MUL:CAPS"></a><h3>COGL_FIXED_MUL()</h3>
<pre class="programlisting">#define COGL_FIXED_MUL(a,b) (cogl_fixed_mul ((a), (b)))
</pre>
<p>
Computes (a * b).
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>a</code></em> :</span></p></td>
<td>a <a class="link" href="cogl-Fixed-Point-API.html#CoglFixed" title="CoglFixed"><span class="type">CoglFixed</span></a> number</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>b</code></em> :</span></p></td>
<td>a <a class="link" href="cogl-Fixed-Point-API.html#CoglFixed" title="CoglFixed"><span class="type">CoglFixed</span></a> number</td>
</tr>
</tbody>
</table></div>
<p class="since">Since 1.0</p>
</div>
<hr>
<div class="refsect2">
<a name="COGL-FIXED-DIV:CAPS"></a><h3>COGL_FIXED_DIV()</h3>
<pre class="programlisting">#define COGL_FIXED_DIV(a,b) (cogl_fixed_div ((a), (b)))
</pre>
<p>
Computes (a / b).
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>a</code></em> :</span></p></td>
<td>a <a class="link" href="cogl-Fixed-Point-API.html#CoglFixed" title="CoglFixed"><span class="type">CoglFixed</span></a> number</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>b</code></em> :</span></p></td>
<td>a <a class="link" href="cogl-Fixed-Point-API.html#CoglFixed" title="CoglFixed"><span class="type">CoglFixed</span></a> number</td>
</tr>
</tbody>
</table></div>
<p class="since">Since 1.0</p>
</div>
<hr>
<div class="refsect2">
<a name="COGL-FIXED-MUL-DIV:CAPS"></a><h3>COGL_FIXED_MUL_DIV()</h3>
<pre class="programlisting">#define COGL_FIXED_MUL_DIV(a,b,c) (cogl_fixed_mul_div ((a), (b), (c)))
</pre>
<p>
Computes ((a * b) / c). It is logically equivalent to:
</p>
<p>
</p>
<div class="informalexample">
<table class="listing_frame" border="0" cellpadding="0" cellspacing="0">
<tbody>
<tr>
<td class="listing_lines" align="right"><pre>1</pre></td>
<td class="listing_code"><pre class="programlisting">res <span class="gtkdoc opt">=</span> <span class="function"><a href="cogl-Fixed-Point-API.html#COGL-FIXED-DIV:CAPS">COGL_FIXED_DIV</a></span> <span class="gtkdoc opt">(</span><span class="function"><a href="cogl-Fixed-Point-API.html#COGL-FIXED-MUL:CAPS">COGL_FIXED_MUL</a></span> <span class="gtkdoc opt">(</span>a<span class="gtkdoc opt">,</span> b<span class="gtkdoc opt">),</span> c<span class="gtkdoc opt">);</span></pre></td>
</tr>
</tbody>
</table>
</div>
<p>
</p>
<p>
But it is shorter to type.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>a</code></em> :</span></p></td>
<td>a <a class="link" href="cogl-Fixed-Point-API.html#CoglFixed" title="CoglFixed"><span class="type">CoglFixed</span></a> number</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>b</code></em> :</span></p></td>
<td>a <a class="link" href="cogl-Fixed-Point-API.html#CoglFixed" title="CoglFixed"><span class="type">CoglFixed</span></a> number</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>c</code></em> :</span></p></td>
<td>a <a class="link" href="cogl-Fixed-Point-API.html#CoglFixed" title="CoglFixed"><span class="type">CoglFixed</span></a> number</td>
</tr>
</tbody>
</table></div>
<p class="since">Since 1.0</p>
</div>
<hr>
<div class="refsect2">
<a name="COGL-FIXED-FAST-DIV:CAPS"></a><h3>COGL_FIXED_FAST_DIV()</h3>
<pre class="programlisting">#define COGL_FIXED_FAST_DIV(a,b) ((((a) << 8) / (b)) << 8)
</pre>
<p>
Fast version of <a class="link" href="cogl-Fixed-Point-API.html#COGL-FIXED-DIV:CAPS" title="COGL_FIXED_DIV()"><code class="literal">COGL_FIXED_DIV</code></a>, implemented as a macro.
</p>
<p>
</p>
<div class="note" style="margin-left: 0.5in; margin-right: 0.5in;">
<h3 class="title">Note</h3>This macro might lose precision. If the precision of the result
is important use <a class="link" href="cogl-Fixed-Point-API.html#COGL-FIXED-DIV:CAPS" title="COGL_FIXED_DIV()"><code class="literal">COGL_FIXED_DIV</code></a> instead.</div>
<p>
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>a</code></em> :</span></p></td>
<td>a <a class="link" href="cogl-Fixed-Point-API.html#CoglFixed" title="CoglFixed"><span class="type">CoglFixed</span></a> number</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>b</code></em> :</span></p></td>
<td>a <a class="link" href="cogl-Fixed-Point-API.html#CoglFixed" title="CoglFixed"><span class="type">CoglFixed</span></a> number</td>
</tr>
</tbody>
</table></div>
<p class="since">Since 1.0</p>
</div>
<hr>
<div class="refsect2">
<a name="COGL-FIXED-FAST-MUL:CAPS"></a><h3>COGL_FIXED_FAST_MUL()</h3>
<pre class="programlisting">#define COGL_FIXED_FAST_MUL(a,b) ((a) >> 8) * ((b) >> 8)
</pre>
<p>
Fast version of <a class="link" href="cogl-Fixed-Point-API.html#COGL-FIXED-MUL:CAPS" title="COGL_FIXED_MUL()"><code class="literal">COGL_FIXED_MUL</code></a>, implemented as a macro.
</p>
<p>
</p>
<div class="note" style="margin-left: 0.5in; margin-right: 0.5in;">
<h3 class="title">Note</h3>This macro might lose precision. If the precision of the result
is important use <a class="link" href="cogl-Fixed-Point-API.html#COGL-FIXED-MUL:CAPS" title="COGL_FIXED_MUL()"><code class="literal">COGL_FIXED_MUL</code></a> instead.</div>
<p>
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>a</code></em> :</span></p></td>
<td>a <a class="link" href="cogl-Fixed-Point-API.html#CoglFixed" title="CoglFixed"><span class="type">CoglFixed</span></a> number</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>b</code></em> :</span></p></td>
<td>a <a class="link" href="cogl-Fixed-Point-API.html#CoglFixed" title="CoglFixed"><span class="type">CoglFixed</span></a> number</td>
</tr>
</tbody>
</table></div>
<p class="since">Since 1.0</p>
</div>
<hr>
<div class="refsect2">
<a name="COGL-FIXED-FRACTION:CAPS"></a><h3>COGL_FIXED_FRACTION()</h3>
<pre class="programlisting">#define COGL_FIXED_FRACTION(x) ((x) & ((1 << COGL_FIXED_Q) - 1))
</pre>
<p>
Retrieves the fractionary part of <em class="parameter"><code>x</code></em>.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody><tr>
<td><p><span class="term"><em class="parameter"><code>x</code></em> :</span></p></td>
<td>a <a class="link" href="cogl-Fixed-Point-API.html#CoglFixed" title="CoglFixed"><span class="type">CoglFixed</span></a> number</td>
</tr></tbody>
</table></div>
<p class="since">Since 1.0</p>
</div>
<hr>
<div class="refsect2">
<a name="COGL-FIXED-FLOOR:CAPS"></a><h3>COGL_FIXED_FLOOR()</h3>
<pre class="programlisting">#define COGL_FIXED_FLOOR(x)</pre>
<p>
Rounds down a fixed point number to the previous integer.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody><tr>
<td><p><span class="term"><em class="parameter"><code>x</code></em> :</span></p></td>
<td>a <a class="link" href="cogl-Fixed-Point-API.html#CoglFixed" title="CoglFixed"><span class="type">CoglFixed</span></a> number</td>
</tr></tbody>
</table></div>
<p class="since">Since 1.0</p>
</div>
<hr>
<div class="refsect2">
<a name="COGL-FIXED-CEIL:CAPS"></a><h3>COGL_FIXED_CEIL()</h3>
<pre class="programlisting">#define COGL_FIXED_CEIL(x) (COGL_FIXED_FLOOR ((x) + 0xffff))
</pre>
<p>
Rounds up a fixed point number to the next integer.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody><tr>
<td><p><span class="term"><em class="parameter"><code>x</code></em> :</span></p></td>
<td>a <a class="link" href="cogl-Fixed-Point-API.html#CoglFixed" title="CoglFixed"><span class="type">CoglFixed</span></a> number</td>
</tr></tbody>
</table></div>
<p class="since">Since 1.0</p>
</div>
<hr>
<div class="refsect2">
<a name="COGL-FIXED-2-PI:CAPS"></a><h3>COGL_FIXED_2_PI</h3>
<pre class="programlisting">#define COGL_FIXED_2_PI (0x0006487f)
</pre>
<p>
Two times pi, expressed as a <a class="link" href="cogl-Fixed-Point-API.html#CoglFixed" title="CoglFixed"><span class="type">CoglFixed</span></a> number.
</p>
<p class="since">Since 1.0</p>
</div>
<hr>
<div class="refsect2">
<a name="COGL-FIXED-PI:CAPS"></a><h3>COGL_FIXED_PI</h3>
<pre class="programlisting">#define COGL_FIXED_PI (0x0003243f)
</pre>
<p>
The number pi, expressed as a <a class="link" href="cogl-Fixed-Point-API.html#CoglFixed" title="CoglFixed"><span class="type">CoglFixed</span></a> number.
</p>
<p class="since">Since 1.0</p>
</div>
<hr>
<div class="refsect2">
<a name="COGL-FIXED-PI-2:CAPS"></a><h3>COGL_FIXED_PI_2</h3>
<pre class="programlisting">#define COGL_FIXED_PI_2 (0x00019220)
</pre>
<p>
Half pi, expressed as a <a class="link" href="cogl-Fixed-Point-API.html#CoglFixed" title="CoglFixed"><span class="type">CoglFixed</span></a> number.
</p>
<p class="since">Since 1.0</p>
</div>
<hr>
<div class="refsect2">
<a name="COGL-FIXED-PI-4:CAPS"></a><h3>COGL_FIXED_PI_4</h3>
<pre class="programlisting">#define COGL_FIXED_PI_4 (0x0000c910)
</pre>
<p>
pi / 4, expressed as <a class="link" href="cogl-Fixed-Point-API.html#CoglFixed" title="CoglFixed"><span class="type">CoglFixed</span></a> number.
</p>
<p class="since">Since 1.0</p>
</div>
<hr>
<div class="refsect2">
<a name="COGL-RADIANS-TO-DEGREES:CAPS"></a><h3>COGL_RADIANS_TO_DEGREES</h3>
<pre class="programlisting">#define COGL_RADIANS_TO_DEGREES (0x394bb8)
</pre>
<p>
Evaluates to 180 / pi in fixed point notation.
</p>
<p class="since">Since 1.0</p>
</div>
<hr>
<div class="refsect2">
<a name="COGL-SQRTI-ARG-10-PERCENT:CAPS"></a><h3>COGL_SQRTI_ARG_10_PERCENT</h3>
<pre class="programlisting">#define COGL_SQRTI_ARG_10_PERCENT 5590
</pre>
<p>
Maximum argument that can be passed to <a class="link" href="cogl-Fixed-Point-API.html#cogl-sqrti" title="cogl_sqrti ()"><code class="function">cogl_sqrti()</code></a> for which the
resulting error is < 10%
</p>
<p class="since">Since 1.0</p>
</div>
<hr>
<div class="refsect2">
<a name="COGL-SQRTI-ARG-5-PERCENT:CAPS"></a><h3>COGL_SQRTI_ARG_5_PERCENT</h3>
<pre class="programlisting">#define COGL_SQRTI_ARG_5_PERCENT 210
</pre>
<p>
Maximum argument that can be passed to <a class="link" href="cogl-Fixed-Point-API.html#cogl-sqrti" title="cogl_sqrti ()"><code class="function">cogl_sqrti()</code></a> for which the
resulting error is < 5%
</p>
<p class="since">Since 1.0</p>
</div>
<hr>
<div class="refsect2">
<a name="COGL-SQRTI-ARG-MAX:CAPS"></a><h3>COGL_SQRTI_ARG_MAX</h3>
<pre class="programlisting">#define COGL_SQRTI_ARG_MAX 0x3fffff
</pre>
<p>
Maximum argument that can be passed to <a class="link" href="cogl-Fixed-Point-API.html#cogl-sqrti" title="cogl_sqrti ()"><code class="function">cogl_sqrti()</code></a> function.
</p>
<p class="since">Since 1.0</p>
</div>
<hr>
<div class="refsect2">
<a name="cogl-sqrti"></a><h3>cogl_sqrti ()</h3>
<pre class="programlisting"><span class="returnvalue">int</span> cogl_sqrti (<em class="parameter"><code><span class="type">int</span> x</code></em>);</pre>
<p>
Very fast fixed point implementation of square root for integers.
</p>
<p>
This function is at least 6x faster than clib <code class="function">sqrt()</code> on x86, and (this is
not a typo!) about 500x faster on ARM without FPU. It's error is less than
5% for arguments smaller than <a class="link" href="cogl-Fixed-Point-API.html#COGL-SQRTI-ARG-5-PERCENT:CAPS" title="COGL_SQRTI_ARG_5_PERCENT"><code class="literal">COGL_SQRTI_ARG_5_PERCENT</code></a> and less than 10%
for narguments smaller than <a class="link" href="cogl-Fixed-Point-API.html#COGL-SQRTI-ARG-10-PERCENT:CAPS" title="COGL_SQRTI_ARG_10_PERCENT"><code class="literal">COGL_SQRTI_ARG_10_PERCENT</code></a>. The maximum
argument that can be passed to this function is <a class="link" href="cogl-Fixed-Point-API.html#COGL-SQRTI-ARG-MAX:CAPS" title="COGL_SQRTI_ARG_MAX"><code class="literal">COGL_SQRTI_ARG_MAX</code></a>.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>x</code></em> :</span></p></td>
<td>integer value</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td>integer square root.</td>
</tr>
</tbody>
</table></div>
<p class="since">Since 1.0</p>
</div>
<hr>
<div class="refsect2">
<a name="cogl-fixed-atan2"></a><h3>cogl_fixed_atan2 ()</h3>
<pre class="programlisting"><a class="link" href="cogl-Fixed-Point-API.html#CoglFixed" title="CoglFixed"><span class="returnvalue">CoglFixed</span></a> cogl_fixed_atan2 (<em class="parameter"><code><a class="link" href="cogl-Fixed-Point-API.html#CoglFixed" title="CoglFixed"><span class="type">CoglFixed</span></a> a</code></em>,
<em class="parameter"><code><a class="link" href="cogl-Fixed-Point-API.html#CoglFixed" title="CoglFixed"><span class="type">CoglFixed</span></a> b</code></em>);</pre>
<p>
Computes the arc tangent of <em class="parameter"><code>a</code></em> / <em class="parameter"><code>b</code></em> but uses the sign of both
arguments to return the angle in right quadrant.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>a</code></em> :</span></p></td>
<td>the numerator as a <a class="link" href="cogl-Fixed-Point-API.html#CoglFixed" title="CoglFixed"><span class="type">CoglFixed</span></a> number</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>b</code></em> :</span></p></td>
<td>the denominator as a <a class="link" href="cogl-Fixed-Point-API.html#CoglFixed" title="CoglFixed"><span class="type">CoglFixed</span></a> number</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td>the arc tangent of the passed fraction, in fixed point
notation</td>
</tr>
</tbody>
</table></div>
<p class="since">Since 1.0</p>
</div>
<hr>
<div class="refsect2">
<a name="cogl-fixed-atan"></a><h3>cogl_fixed_atan ()</h3>
<pre class="programlisting"><a class="link" href="cogl-Fixed-Point-API.html#CoglFixed" title="CoglFixed"><span class="returnvalue">CoglFixed</span></a> cogl_fixed_atan (<em class="parameter"><code><a class="link" href="cogl-Fixed-Point-API.html#CoglFixed" title="CoglFixed"><span class="type">CoglFixed</span></a> a</code></em>);</pre>
<p>
Computes the arc tangent of <em class="parameter"><code>a</code></em>.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>a</code></em> :</span></p></td>
<td>a <a class="link" href="cogl-Fixed-Point-API.html#CoglFixed" title="CoglFixed"><span class="type">CoglFixed</span></a> number</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td>the arc tangent of the passed value, in fixed point notation</td>
</tr>
</tbody>
</table></div>
<p class="since">Since 1.0</p>
</div>
<hr>
<div class="refsect2">
<a name="cogl-fixed-cos"></a><h3>cogl_fixed_cos ()</h3>
<pre class="programlisting"><a class="link" href="cogl-Fixed-Point-API.html#CoglFixed" title="CoglFixed"><span class="returnvalue">CoglFixed</span></a> cogl_fixed_cos (<em class="parameter"><code><a class="link" href="cogl-Fixed-Point-API.html#CoglFixed" title="CoglFixed"><span class="type">CoglFixed</span></a> angle</code></em>);</pre>
<p>
Computes the cosine of <em class="parameter"><code>angle</code></em>.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>angle</code></em> :</span></p></td>
<td>a <a class="link" href="cogl-Fixed-Point-API.html#CoglFixed" title="CoglFixed"><span class="type">CoglFixed</span></a> number</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td>the cosine of the passed angle, in fixed point notation</td>
</tr>
</tbody>
</table></div>
<p class="since">Since 1.0</p>
</div>
<hr>
<div class="refsect2">
<a name="cogl-fixed-log2"></a><h3>cogl_fixed_log2 ()</h3>
<pre class="programlisting"><a class="link" href="cogl-Fixed-Point-API.html#CoglFixed" title="CoglFixed"><span class="returnvalue">CoglFixed</span></a> cogl_fixed_log2 (<em class="parameter"><code>unsigned <span class="type">int</span> x</code></em>);</pre>
<p>
Calculates base 2 logarithm.
</p>
<p>
This function is some 2.5 times faster on x86, and over 12 times faster on
fpu-less arm, than using libc <code class="function">log()</code>.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>x</code></em> :</span></p></td>
<td>value to calculate base 2 logarithm from</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td>base 2 logarithm.</td>
</tr>
</tbody>
</table></div>
<p class="since">Since 1.0</p>
</div>
<hr>
<div class="refsect2">
<a name="cogl-fixed-pow"></a><h3>cogl_fixed_pow ()</h3>
<pre class="programlisting">unsigned <span class="returnvalue">int</span> cogl_fixed_pow (<em class="parameter"><code>unsigned <span class="type">int</span> x</code></em>,
<em class="parameter"><code><a class="link" href="cogl-Fixed-Point-API.html#CoglFixed" title="CoglFixed"><span class="type">CoglFixed</span></a> y</code></em>);</pre>
<p>
Calculates <em class="parameter"><code>x</code></em> to the <em class="parameter"><code>y</code></em> power.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>x</code></em> :</span></p></td>
<td>base</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>y</code></em> :</span></p></td>
<td>
<a class="link" href="cogl-Fixed-Point-API.html#CoglFixed" title="CoglFixed"><span class="type">CoglFixed</span></a> exponent</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td>the power of <em class="parameter"><code>x</code></em> to the <em class="parameter"><code>y</code></em>
</td>
</tr>
</tbody>
</table></div>
<p class="since">Since 1.0</p>
</div>
<hr>
<div class="refsect2">
<a name="cogl-fixed-pow2"></a><h3>cogl_fixed_pow2 ()</h3>
<pre class="programlisting">unsigned <span class="returnvalue">int</span> cogl_fixed_pow2 (<em class="parameter"><code><a class="link" href="cogl-Fixed-Point-API.html#CoglFixed" title="CoglFixed"><span class="type">CoglFixed</span></a> x</code></em>);</pre>
<p>
Calculates 2 to the <em class="parameter"><code>x</code></em> power.
</p>
<p>
This function is around 11 times faster on x86, and around 22 times faster
on fpu-less arm than libc pow(2, x).
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>x</code></em> :</span></p></td>
<td>a <a class="link" href="cogl-Fixed-Point-API.html#CoglFixed" title="CoglFixed"><span class="type">CoglFixed</span></a> number</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td>the power of 2 to the passed value</td>
</tr>
</tbody>
</table></div>
<p class="since">Since 1.0</p>
</div>
<hr>
<div class="refsect2">
<a name="cogl-fixed-sin"></a><h3>cogl_fixed_sin ()</h3>
<pre class="programlisting"><a class="link" href="cogl-Fixed-Point-API.html#CoglFixed" title="CoglFixed"><span class="returnvalue">CoglFixed</span></a> cogl_fixed_sin (<em class="parameter"><code><a class="link" href="cogl-Fixed-Point-API.html#CoglFixed" title="CoglFixed"><span class="type">CoglFixed</span></a> angle</code></em>);</pre>
<p>
Computes the sine of <em class="parameter"><code>angle</code></em>.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>angle</code></em> :</span></p></td>
<td>a <a class="link" href="cogl-Fixed-Point-API.html#CoglFixed" title="CoglFixed"><span class="type">CoglFixed</span></a> number</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td>the sine of the passed angle, in fixed point notation</td>
</tr>
</tbody>
</table></div>
<p class="since">Since 1.0</p>
</div>
<hr>
<div class="refsect2">
<a name="cogl-fixed-sqrt"></a><h3>cogl_fixed_sqrt ()</h3>
<pre class="programlisting"><a class="link" href="cogl-Fixed-Point-API.html#CoglFixed" title="CoglFixed"><span class="returnvalue">CoglFixed</span></a> cogl_fixed_sqrt (<em class="parameter"><code><a class="link" href="cogl-Fixed-Point-API.html#CoglFixed" title="CoglFixed"><span class="type">CoglFixed</span></a> x</code></em>);</pre>
<p>
Computes the square root of <em class="parameter"><code>x</code></em>.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>x</code></em> :</span></p></td>
<td>a <a class="link" href="cogl-Fixed-Point-API.html#CoglFixed" title="CoglFixed"><span class="type">CoglFixed</span></a> number</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td>the square root of the passed value, in floating point
notation</td>
</tr>
</tbody>
</table></div>
<p class="since">Since 1.0</p>
</div>
<hr>
<div class="refsect2">
<a name="cogl-fixed-tan"></a><h3>cogl_fixed_tan ()</h3>
<pre class="programlisting"><a class="link" href="cogl-Fixed-Point-API.html#CoglFixed" title="CoglFixed"><span class="returnvalue">CoglFixed</span></a> cogl_fixed_tan (<em class="parameter"><code><a class="link" href="cogl-Fixed-Point-API.html#CoglFixed" title="CoglFixed"><span class="type">CoglFixed</span></a> angle</code></em>);</pre>
<p>
Computes the tangent of <em class="parameter"><code>angle</code></em>.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>angle</code></em> :</span></p></td>
<td>a <a class="link" href="cogl-Fixed-Point-API.html#CoglFixed" title="CoglFixed"><span class="type">CoglFixed</span></a> number</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td>the tangent of the passed angle, in fixed point notation</td>
</tr>
</tbody>
</table></div>
<p class="since">Since 1.0</p>
</div>
<hr>
<div class="refsect2">
<a name="cogl-fixed-div"></a><h3>cogl_fixed_div ()</h3>
<pre class="programlisting"><a class="link" href="cogl-Fixed-Point-API.html#CoglFixed" title="CoglFixed"><span class="returnvalue">CoglFixed</span></a> cogl_fixed_div (<em class="parameter"><code><a class="link" href="cogl-Fixed-Point-API.html#CoglFixed" title="CoglFixed"><span class="type">CoglFixed</span></a> a</code></em>,
<em class="parameter"><code><a class="link" href="cogl-Fixed-Point-API.html#CoglFixed" title="CoglFixed"><span class="type">CoglFixed</span></a> b</code></em>);</pre>
</div>
<hr>
<div class="refsect2">
<a name="cogl-fixed-mul"></a><h3>cogl_fixed_mul ()</h3>
<pre class="programlisting"><a class="link" href="cogl-Fixed-Point-API.html#CoglFixed" title="CoglFixed"><span class="returnvalue">CoglFixed</span></a> cogl_fixed_mul (<em class="parameter"><code><a class="link" href="cogl-Fixed-Point-API.html#CoglFixed" title="CoglFixed"><span class="type">CoglFixed</span></a> a</code></em>,
<em class="parameter"><code><a class="link" href="cogl-Fixed-Point-API.html#CoglFixed" title="CoglFixed"><span class="type">CoglFixed</span></a> b</code></em>);</pre>
</div>
<hr>
<div class="refsect2">
<a name="cogl-fixed-mul-div"></a><h3>cogl_fixed_mul_div ()</h3>
<pre class="programlisting"><a class="link" href="cogl-Fixed-Point-API.html#CoglFixed" title="CoglFixed"><span class="returnvalue">CoglFixed</span></a> cogl_fixed_mul_div (<em class="parameter"><code><a class="link" href="cogl-Fixed-Point-API.html#CoglFixed" title="CoglFixed"><span class="type">CoglFixed</span></a> a</code></em>,
<em class="parameter"><code><a class="link" href="cogl-Fixed-Point-API.html#CoglFixed" title="CoglFixed"><span class="type">CoglFixed</span></a> b</code></em>,
<em class="parameter"><code><a class="link" href="cogl-Fixed-Point-API.html#CoglFixed" title="CoglFixed"><span class="type">CoglFixed</span></a> c</code></em>);</pre>
</div>
<hr>
<div class="refsect2">
<a name="CoglAngle"></a><h3>CoglAngle</h3>
<pre class="programlisting">typedef gint32 CoglAngle;
</pre>
<p>
Integer representation of an angle such that 1024 corresponds to
full circle (i.e., 2 * pi).
</p>
<p class="since">Since 1.0</p>
</div>
<hr>
<div class="refsect2">
<a name="COGL-ANGLE-FROM-DEG:CAPS"></a><h3>COGL_ANGLE_FROM_DEG()</h3>
<pre class="programlisting">#define COGL_ANGLE_FROM_DEG(x) (COGL_FLOAT_TO_INT (((float)(x) * 1024.0f) / 360.0f))
</pre>
<p>
Converts an angle in degrees into a <a class="link" href="cogl-Fixed-Point-API.html#CoglAngle" title="CoglAngle"><span class="type">CoglAngle</span></a>.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody><tr>
<td><p><span class="term"><em class="parameter"><code>x</code></em> :</span></p></td>
<td>an angle in degrees in floating point notation</td>
</tr></tbody>
</table></div>
<p class="since">Since 1.0</p>
</div>
<hr>
<div class="refsect2">
<a name="COGL-ANGLE-FROM-DEGX:CAPS"></a><h3>COGL_ANGLE_FROM_DEGX()</h3>
<pre class="programlisting">#define COGL_ANGLE_FROM_DEGX(x) (COGL_FIXED_TO_INT ((((x) / 360) * 1024) + COGL_FIXED_0_5))
</pre>
<p>
Converts an angle in degrees into a <a class="link" href="cogl-Fixed-Point-API.html#CoglAngle" title="CoglAngle"><span class="type">CoglAngle</span></a>.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody><tr>
<td><p><span class="term"><em class="parameter"><code>x</code></em> :</span></p></td>
<td>an angle in degrees in fixed point notation</td>
</tr></tbody>
</table></div>
<p class="since">Since 1.0</p>
</div>
<hr>
<div class="refsect2">
<a name="COGL-ANGLE-TO-DEG:CAPS"></a><h3>COGL_ANGLE_TO_DEG()</h3>
<pre class="programlisting">#define COGL_ANGLE_TO_DEG(x) (((float)(x) * 360.0) / 1024.0)
</pre>
<p>
Converts a <a class="link" href="cogl-Fixed-Point-API.html#CoglAngle" title="CoglAngle"><span class="type">CoglAngle</span></a> into an angle in degrees, using floatint point
notation.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody><tr>
<td><p><span class="term"><em class="parameter"><code>x</code></em> :</span></p></td>
<td>a <a class="link" href="cogl-Fixed-Point-API.html#CoglAngle" title="CoglAngle"><span class="type">CoglAngle</span></a>
</td>
</tr></tbody>
</table></div>
<p class="since">Since 1.0</p>
</div>
<hr>
<div class="refsect2">
<a name="COGL-ANGLE-TO-DEGX:CAPS"></a><h3>COGL_ANGLE_TO_DEGX()</h3>
<pre class="programlisting">#define COGL_ANGLE_TO_DEGX(x) (COGL_FIXED_FROM_INT ((x) * 45) / 128)
</pre>
<p>
Converts a <a class="link" href="cogl-Fixed-Point-API.html#CoglAngle" title="CoglAngle"><span class="type">CoglAngle</span></a> into an angle in degrees, using fixed point notation
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody><tr>
<td><p><span class="term"><em class="parameter"><code>x</code></em> :</span></p></td>
<td>a <a class="link" href="cogl-Fixed-Point-API.html#CoglAngle" title="CoglAngle"><span class="type">CoglAngle</span></a>
</td>
</tr></tbody>
</table></div>
<p class="since">Since 1.0</p>
</div>
<hr>
<div class="refsect2">
<a name="cogl-angle-cos"></a><h3>cogl_angle_cos ()</h3>
<pre class="programlisting"><a class="link" href="cogl-Fixed-Point-API.html#CoglFixed" title="CoglFixed"><span class="returnvalue">CoglFixed</span></a> cogl_angle_cos (<em class="parameter"><code><a class="link" href="cogl-Fixed-Point-API.html#CoglAngle" title="CoglAngle"><span class="type">CoglAngle</span></a> angle</code></em>);</pre>
<p>
Computes the cosine of <em class="parameter"><code>angle</code></em>
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>angle</code></em> :</span></p></td>
<td>an angle expressed using <a class="link" href="cogl-Fixed-Point-API.html#CoglAngle" title="CoglAngle"><span class="type">CoglAngle</span></a>
</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td>the cosine of the passed angle</td>
</tr>
</tbody>
</table></div>
<p class="since">Since 1.0</p>
</div>
<hr>
<div class="refsect2">
<a name="cogl-angle-sin"></a><h3>cogl_angle_sin ()</h3>
<pre class="programlisting"><a class="link" href="cogl-Fixed-Point-API.html#CoglFixed" title="CoglFixed"><span class="returnvalue">CoglFixed</span></a> cogl_angle_sin (<em class="parameter"><code><a class="link" href="cogl-Fixed-Point-API.html#CoglAngle" title="CoglAngle"><span class="type">CoglAngle</span></a> angle</code></em>);</pre>
<p>
Computes the sine of <em class="parameter"><code>angle</code></em>
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>angle</code></em> :</span></p></td>
<td>an angle expressed using <a class="link" href="cogl-Fixed-Point-API.html#CoglAngle" title="CoglAngle"><span class="type">CoglAngle</span></a>
</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td>the sine of the passed angle</td>
</tr>
</tbody>
</table></div>
<p class="since">Since 1.0</p>
</div>
<hr>
<div class="refsect2">
<a name="cogl-angle-tan"></a><h3>cogl_angle_tan ()</h3>
<pre class="programlisting"><a class="link" href="cogl-Fixed-Point-API.html#CoglFixed" title="CoglFixed"><span class="returnvalue">CoglFixed</span></a> cogl_angle_tan (<em class="parameter"><code><a class="link" href="cogl-Fixed-Point-API.html#CoglAngle" title="CoglAngle"><span class="type">CoglAngle</span></a> angle</code></em>);</pre>
<p>
Computes the tangent of <em class="parameter"><code>angle</code></em>
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>angle</code></em> :</span></p></td>
<td>an angle expressed using <a class="link" href="cogl-Fixed-Point-API.html#CoglAngle" title="CoglAngle"><span class="type">CoglAngle</span></a>
</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td>the tangent of the passed angle</td>
</tr>
</tbody>
</table></div>
<p class="since">Since 1.0</p>
</div>
</div>
</div>
<div class="footer">
<hr>
Generated by GTK-Doc V1.18</div>
</body>
</html>
|