亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關于我們
? 蟲蟲下載站

?? fixedmath.h

?? 44b0處理器+UCOS操作系統+miniGUI源代碼
?? H
?? 第 1 頁 / 共 2 頁
字號:
/** * \file fixedmath.h * \author Wei Yongming <ymwei@minigui.org> * \date 2002/01/12 *  *  This file includes fixed point and three-dimension math routines. * \verbatim    Copyright (C) 1998-2002 Wei Yongming.    Copyright (C) 2002-2003 Feynman Software.    This file is part of MiniGUI, a lightweight Graphics User Interface    support library for real-time embedded Linux.    This program 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 2 of the License, or    (at your option) any later version.    This program 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 this program; if not, write to the Free Software    Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA \endverbatim *//* * $Id: fixedmath.h,v 1.18 2004/02/25 02:34:49 weiym Exp $ * *             MiniGUI for Linux, uClinux, eCos, and uC/OS-II version 1.5.x *             Copyright (C) 1998-2002 Wei Yongming. *             Copyright (C) 2002-2004 Feynman Software. * *             Fix point math routins come from Allegro *             By Shawn Hargreaves and others. *             So thank for their great work and good license. * *             "Allegro is a gift-software"  * *         ______   ___    ___ *        /\  _  \ /\_ \  /\_ \ *        \ \ \L\ \\//\ \ \//\ \      __     __   _ __   ___ *         \ \  __ \ \ \ \  \ \ \   /'__`\ /'_ `\/\`'__\/ __`\ *          \ \ \/\ \ \_\ \_ \_\ \_/\  __//\ \L\ \ \ \//\ \L\ \ *           \ \_\ \_\/\____\/\____\ \____\ \____ \ \_\\ \____/ *            \/_/\/_/\/____/\/____/\/____/\/___L\ \/_/ \/___/ *                                           /\____/ *                                           \_/__/ * */#ifndef _MGUI_FIXED_MATH_H#define _MGUI_FIXED_MATH_H#include <errno.h>#include <math.h>/* Set up for C function definitions, even when using C++ */#ifdef __cplusplusextern "C" {#endif#ifdef _FIXED_MATH    /**     * \addtogroup fns Functions     * @{     */    /**     * \addtogroup global_fns Global/general functions     * @{     */    /**     * \defgroup fixed_math_fns Fixed point math functions     *      * You know that the float point mathematics routines are very     * expensive. If you do not want precision mathematics result,      * you can use fixed point. MiniGUI uses a double word (32-bit)     * integer to represent a fixed point ranged from -32767.0 to      * 32767.0, and defines some fixed point mathematics routines for      * your application. Some GDI functions need fixed point      * math routines, like \a Arc.     *     * Example 1:     *      * \include fixed_point.c     *     * Example 2:     *      * \include fixedpoint.c     * @{     *//** * \fn fixed fsqrt (fixed x) * \brief Returns the non-negative square root of a fixed point value. * * This function returns the non-negative square root of \a x. * It fails and sets errno to EDOM, if x is negative. * * \sa fhypot */fixed fsqrt (fixed x);/** * \fn fixed fhypot (fixed x, fixed y) * \brief Returns the Euclidean distance from the origin. *  * The function returns the \a sqrt(x*x+y*y). This is the length of  * the hypotenuse of a right-angle triangle with sides of length \a x and \a y,  * or the distance of the point \a (x,y) from the origin. * * \sa fsqrt */fixed fhypot (fixed x, fixed y);/** * \fn fixed fatan (fixed x) * \brief Calculates the arc tangent of a fixed point value. * * This function calculates the arc tangent of \a x; that is the value  * whose tangent is \a x. * * \return Returns the arc tangent in radians and the value is  *         mathematically defined to be between -PI/2 and PI/2 (inclusive). * * \sa fatan2 */fixed fatan (fixed x);/** * \fn fixed fatan2 (fixed y, fixed x) * \brief Calclulates the arc tangent of two fixed point variables. * *  This function calculates the arc tangent of the two variables \a x and \a y. *  It is similar to calculating the arc tangent of \a y / \a x, except that  *  the signs of both arguments are used to determine the quadrant of the result. * * \return Returns the result in radians, which is between -PI and PI (inclusive). * * \sa fatan */fixed fatan2 (fixed y, fixed x);extern fixed _cos_tbl[];extern fixed _tan_tbl[];extern fixed _acos_tbl[];/************************** inline fixed point math functions *****************//* ftofix and fixtof are used in generic C versions of fmul and fdiv *//** * \fn fixed ftofix (double x) * \brief Converts a float point value to a fixed point value. * * This function converts the specified float point value \a x to  * a fixed point value. * * \note The float point should be ranged from -32767.0 to 32767.0. * If it runs out of the range, this function sets \a errno to \a ERANGE. * * \sa fixtof */static inline fixed ftofix (double x){    if (x > 32767.0) {      errno = ERANGE;      return 0x7FFFFFFF;   }   if (x < -32767.0) {      errno = ERANGE;      return -0x7FFFFFFF;   }   return (long)(x * 65536.0 + (x < 0 ? -0.5 : 0.5)); }/** * \fn double fixtof (fixed x) * \brief Converts a fixed point value to a float point value. * * This function converts the specified fixed point value \a x to  * a float point value. * * \sa ftofix */static inline double fixtof (fixed x){    return (double)x / 65536.0; }/** * \fn fixed fadd (fixed x, fixed y) * \brief Returns the sum of two fixed point values. * * This function adds two fixed point values \a x and \a y, and * returns the sum. * * \param x x,y: Two addends. * \param y x,y: Two addends. * \return The sum. If the result runs out of range of fixed point, this function *         sets \a errno to \a ERANGE. * * \sa fsub */static inline fixed fadd (fixed x, fixed y){   fixed result = x + y;   if (result >= 0) {      if ((x < 0) && (y < 0)) {	 errno = ERANGE;	 return -0x7FFFFFFF;      }      else	 return result;   }   else {      if ((x > 0) && (y > 0)) {	 errno = ERANGE;	 return 0x7FFFFFFF;      }      else	 return result;   }}/** * \fn fixed fsub (fixed x, fixed y) * \brief Subtract a fixed point value from another. * * This function subtracts the fixed point values \a y from the fixed point value \a x, * and returns the difference. * * \param x The minuend. * \param y The subtrahend. * \return The difference. If the result runs out of range of fixed point, this function *         sets \a errno to \a ERANGE. * * \sa fadd */static inline fixed fsub (fixed x, fixed y){   fixed result = x - y;   if (result >= 0) {      if ((x < 0) && (y > 0)) {	 errno = ERANGE;	 return -0x7FFFFFFF;      }      else	 return result;   }   else {      if ((x > 0) && (y < 0)) {	 errno = ERANGE;	 return 0x7FFFFFFF;      }      else	 return result;   }}/** * \fn fixed fmul (fixed x, fixed y) * \brief Returns the product of two fixed point values. *  * This function returns the product of two fixed point values \a x and \a y. * * \param x The faciend. * \param y The multiplicato. * \return The prodcut. If the result runs out of range of fixed point, this function *         sets \a errno to \a ERANGE. *  * \sa fdiv */static inline fixed fmul (fixed x, fixed y){   return ftofix(fixtof(x) * fixtof(y));}/** * \fn fixed fdiv (fixed x, fixed y) * \brief Returns the quotient of two fixed point values. *  * This function returns the quotient of two fixed point values \a x and \a y. * * \param x The dividend. * \param y The divisor. * \return The quotient. If the result runs out of range of fixed point, this function *         sets \a errno to \a ERANGE. *  * \sa fmul */static inline fixed fdiv (fixed x, fixed y){   if (y == 0) {      errno = ERANGE;

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
国产精品一区二区在线播放| 精品毛片乱码1区2区3区| 欧美国产日韩精品免费观看| 久久99国产乱子伦精品免费| 精品粉嫩超白一线天av| 国产一区欧美二区| 国产亚洲一区二区三区在线观看 | 久久一区二区视频| 国产一区欧美一区| 国产精品国产三级国产aⅴ入口| 91蜜桃免费观看视频| 一区二区三区成人在线视频| 欧美放荡的少妇| 狠狠色丁香久久婷婷综| 欧美激情一区二区三区四区| 97国产一区二区| 亚洲不卡在线观看| 欧美电视剧在线看免费| 成人午夜私人影院| 亚洲小说春色综合另类电影| 日韩欧美亚洲另类制服综合在线| 国产成人一级电影| 亚洲精品精品亚洲| 91精品国产入口| 成人黄色777网| 午夜成人免费视频| 国产欧美日韩精品一区| 欧美日本免费一区二区三区| 国产一区二区三区精品视频| 一区二区三区四区av| 日韩欧美成人一区| 色伊人久久综合中文字幕| 青青草一区二区三区| 久久久久久久久久久黄色| 一本在线高清不卡dvd| 久久99深爱久久99精品| 一区二区三区四区亚洲| 久久久久久亚洲综合| 欧美日韩一卡二卡| 国产精品12区| 日本不卡不码高清免费观看| 1024成人网色www| 欧美大片国产精品| 欧美午夜精品久久久| 国产.精品.日韩.另类.中文.在线.播放| 夜夜亚洲天天久久| 国产精品视频看| 欧美变态口味重另类| 在线一区二区视频| 成人高清伦理免费影院在线观看| 免费观看日韩电影| 亚洲第一狼人社区| 亚洲免费观看高清完整版在线观看| 欧美videos大乳护士334| 欧美亚洲禁片免费| 99国产欧美另类久久久精品| 国产一区91精品张津瑜| 日韩中文字幕区一区有砖一区 | 国产女主播视频一区二区| 欧美绝品在线观看成人午夜影视| 不卡的看片网站| 极品少妇一区二区| 欧美aaaaaa午夜精品| 亚洲一区二区美女| 亚洲摸摸操操av| 国产精品久久久久影院| 国产亚洲福利社区一区| 精品久久久久一区| 日韩欧美精品在线视频| 欧美一级艳片视频免费观看| 欧美日韩国产乱码电影| 欧美性大战久久| 欧美午夜精品一区二区蜜桃| 欧美综合在线视频| 欧美综合一区二区三区| 欧美日韩在线一区二区| 欧美日韩国产综合视频在线观看| 欧美午夜一区二区| 欧美日产国产精品| 日韩欧美一区二区在线视频| 91精品国产欧美日韩| 欧美一区永久视频免费观看| 欧美一区二区视频在线观看| 日韩一区二区三免费高清| 欧美一区三区四区| 精品免费视频.| 久久久综合视频| 欧美国产精品劲爆| 亚洲女女做受ⅹxx高潮| 午夜精彩视频在线观看不卡| 免费看日韩精品| 日韩精品一区二区三区视频播放 | 欧美午夜理伦三级在线观看| 91麻豆国产福利在线观看| 91丨九色丨尤物| 在线观看视频欧美| 欧美日韩国产另类不卡| 日韩精品专区在线| 国产亚洲1区2区3区| 亚洲色图视频网| 亚洲bt欧美bt精品| 美女视频网站久久| 国产成人午夜精品影院观看视频| 国产伦理精品不卡| 91免费小视频| 欧美乱妇一区二区三区不卡视频| 日韩一区二区三| 中文字幕一区二区三中文字幕| 亚洲精品久久嫩草网站秘色| 美女视频免费一区| 成人一级片在线观看| 欧美视频在线观看一区| 日韩欧美国产三级| 亚洲婷婷综合色高清在线| 亚洲第一激情av| 从欧美一区二区三区| 欧美丰满一区二区免费视频| 国产亚洲精品精华液| 亚洲r级在线视频| 国产成人激情av| 欧美三级电影在线观看| 久久天天做天天爱综合色| 亚洲精品成人少妇| 免费av网站大全久久| av午夜精品一区二区三区| 这里只有精品免费| 中文字幕日韩一区| 久久www免费人成看片高清| 91蝌蚪porny| 久久综合色之久久综合| 亚洲高清免费在线| 国产91丝袜在线18| 欧美一卡2卡3卡4卡| 亚洲精品成a人| 成人在线视频一区| 精品国产一区二区三区忘忧草| 亚洲精品高清在线观看| 懂色av一区二区夜夜嗨| 欧美丰满美乳xxx高潮www| 伊人性伊人情综合网| 国产精品1区二区.| 日韩欧美久久久| 天堂蜜桃91精品| 在线免费观看视频一区| 中文字幕 久热精品 视频在线| 久久国产精品露脸对白| 欧美日韩黄色影视| 亚洲免费av观看| 成人99免费视频| 国产视频不卡一区| 激情深爱一区二区| 337p亚洲精品色噜噜狠狠| 一区二区三区欧美日韩| 99久久精品久久久久久清纯| 亚洲国产精品99久久久久久久久| 久久草av在线| 亚洲精品在线免费观看视频| 日本强好片久久久久久aaa| 欧美在线观看一区二区| 亚洲视频香蕉人妖| 97精品视频在线观看自产线路二| 国产女人aaa级久久久级| 国产精品影视网| 久久色视频免费观看| 久久99久久精品欧美| 日韩欧美123| 久久99精品国产91久久来源| 日韩写真欧美这视频| 七七婷婷婷婷精品国产| 日韩视频在线永久播放| 久久精品国产成人一区二区三区| 日韩一区二区三区免费观看| 视频一区在线播放| 日韩一区二区视频| 精东粉嫩av免费一区二区三区| 日韩午夜av电影| 韩国成人精品a∨在线观看| 欧美精品一区二区在线播放| 韩国在线一区二区| 国产视频一区二区在线| 99视频精品在线| 亚洲欧美日韩系列| 欧美日韩国产在线观看| 五月激情六月综合| 精品国产1区2区3区| 成人免费高清在线观看| 成人欧美一区二区三区黑人麻豆 | 精品免费视频.| 国产一区二区美女诱惑| 亚洲国产精华液网站w| 日本久久一区二区三区| 亚洲成人黄色小说| 精品国产乱码久久久久久老虎 | 91视频xxxx| 亚洲成a人片在线观看中文| 欧美一级高清大全免费观看| 国内精品在线播放| 亚洲欧美综合另类在线卡通| 欧美午夜一区二区三区| 精品亚洲国产成人av制服丝袜 |