亚洲欧美第一页_禁久久精品乱码_粉嫩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一区二区三区免费野_久草精品视频
色天天综合久久久久综合片| 美日韩一区二区| 国产99久久久国产精品免费看| 精品成人佐山爱一区二区| 久久精品久久久精品美女| 2023国产精品| 国产精品1024| 国产精品不卡视频| 精品视频在线看| 日韩国产在线观看一区| 欧美一区二区三区免费大片| 国产精品 日产精品 欧美精品| 国产精品九色蝌蚪自拍| 欧美午夜在线一二页| 日本欧美大码aⅴ在线播放| 337p日本欧洲亚洲大胆精品| 91最新地址在线播放| 日本欧美在线观看| 国产人成一区二区三区影院| 91丨porny丨户外露出| 奇米色777欧美一区二区| 欧美韩国日本不卡| 日韩精品一区二区三区三区免费| 国产精品亚洲第一| 一区二区视频免费在线观看| 精品国产一二三| 99久久99久久精品国产片果冻| 三级久久三级久久久| 国产亚洲制服色| 欧美日韩一二三| 成人一区二区三区中文字幕| 一区二区三区电影在线播| 精品日韩一区二区三区| 97se亚洲国产综合自在线不卡| 免费视频一区二区| 亚洲色图19p| 久久夜色精品国产噜噜av| 欧美性感一区二区三区| 国产高清精品久久久久| 午夜精品爽啪视频| 亚洲欧洲精品一区二区精品久久久| 欧美一级久久久| 一本一道久久a久久精品| 国产中文字幕精品| 视频一区欧美精品| 亚洲色图丝袜美腿| 久久久青草青青国产亚洲免观| 欧美性videosxxxxx| 成人不卡免费av| 激情综合网激情| 天天做天天摸天天爽国产一区 | 综合欧美一区二区三区| 日韩欧美二区三区| 欧美午夜片在线观看| 粉嫩嫩av羞羞动漫久久久 | 亚洲香蕉伊在人在线观| 国产精品午夜久久| 久久久精品黄色| 精品国产乱码久久久久久闺蜜 | 色先锋久久av资源部| 麻豆高清免费国产一区| 亚洲午夜电影网| 一区二区三区国产精华| 亚洲欧洲在线观看av| 国产精品美女久久久久久久网站| 久久久亚洲精品石原莉奈| 日韩久久久久久| 欧美一区二区三区四区久久| 4438x成人网最大色成网站| 欧美日韩大陆在线| 欧美男生操女生| 欧美精品日韩精品| 3751色影院一区二区三区| 欧美日韩久久不卡| 欧美日韩一区二区电影| 欧美日韩二区三区| 欧美一区二区三区影视| 日韩精品专区在线影院观看| 欧美一级一级性生活免费录像| 91精品福利在线一区二区三区 | 3atv在线一区二区三区| 在线成人av影院| 日韩欧美在线影院| 精品国产一区二区三区久久影院| 久久色在线视频| 国产精品伦理一区二区| 亚洲免费在线看| 午夜精品爽啪视频| 麻豆精品久久久| 国产精品一二一区| 99视频一区二区| 色偷偷一区二区三区| 欧美日韩一区三区四区| 亚洲欧美色图小说| 亚洲成人中文在线| 九色|91porny| 99国产欧美久久久精品| 欧美性xxxxxxxx| 精品少妇一区二区三区免费观看| 国产午夜精品一区二区三区嫩草| 亚洲人成网站在线| 日韩一区精品视频| 国产一区二区三区高清播放| 91亚洲精华国产精华精华液| 欧美剧在线免费观看网站| 亚洲精品在线三区| 综合网在线视频| 日本强好片久久久久久aaa| 国产精品996| 欧美亚洲动漫制服丝袜| 精品国产网站在线观看| 中文字幕一区二区三区四区不卡| 亚洲chinese男男1069| 激情综合色丁香一区二区| 95精品视频在线| 日韩精品一区二区三区三区免费| 国产精品成人在线观看| 美女视频一区在线观看| 成人黄色片在线观看| 6080午夜不卡| 亚洲视频在线观看三级| 久久精品国产久精国产爱| 99视频一区二区| 精品久久一区二区| 亚洲欧美国产三级| 国产老肥熟一区二区三区| 欧美日韩中文国产| 国产精品久久久一区麻豆最新章节| 日韩精品91亚洲二区在线观看| av资源站一区| 2023国产一二三区日本精品2022| 亚洲午夜国产一区99re久久| 成人免费高清视频在线观看| 精品国免费一区二区三区| 一级日本不卡的影视| 国产成人午夜精品5599| 91精品国产一区二区人妖| 樱花草国产18久久久久| 国产成人av电影| 精品国产乱码久久久久久久| 日韩国产欧美在线观看| 91麻豆国产自产在线观看| 亚洲精品在线三区| 蜜臀av亚洲一区中文字幕| 欧美日本精品一区二区三区| 亚洲美女免费在线| 99精品国产热久久91蜜凸| 久久精品一区蜜桃臀影院| 欧美中文字幕一区二区三区 | 色av成人天堂桃色av| 国产日韩欧美一区二区三区综合| 麻豆一区二区在线| 欧美肥胖老妇做爰| 亚洲一二三四久久| 91黄色激情网站| 亚洲日本在线a| 99re热视频精品| 国产精品萝li| 不卡视频免费播放| 国产精品美女久久久久aⅴ| 国产超碰在线一区| 国产欧美精品一区二区色综合| 精品亚洲成av人在线观看| 精品欧美一区二区在线观看| 蜜臀av性久久久久蜜臀aⅴ| 日韩视频永久免费| 精品一二线国产| 久久婷婷久久一区二区三区| 国产激情偷乱视频一区二区三区| 国产午夜精品一区二区三区视频| 高清免费成人av| 中文字幕一区二区三区不卡| 色综合色狠狠综合色| 一区二区三区欧美亚洲| 精品视频在线视频| 美女一区二区视频| 欧美成人高清电影在线| 国产激情一区二区三区| 亚洲国产精品国自产拍av| 99精品热视频| 亚洲成a人在线观看| 日韩小视频在线观看专区| 国产综合一区二区| 国产精品女同互慰在线看| 91欧美激情一区二区三区成人| 亚洲一区二区偷拍精品| 51精品秘密在线观看| 久久99精品久久久久久国产越南| 国产视频不卡一区| 99久久精品免费看| 亚洲动漫第一页| ww久久中文字幕| 色综合色狠狠天天综合色| 肉丝袜脚交视频一区二区| 精品国产伦一区二区三区观看体验| 成人免费毛片片v| 五月婷婷综合在线| 久久久久国产免费免费| 在线观看一区二区视频| 久久成人免费日本黄色|