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

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

?? fixedmath.h

?? MiniGUI到ucOS-II的位圖操作。通過該例子
?? 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区在线观看| 青青草国产成人av片免费| 亚洲精品一线二线三线| 国产精品麻豆视频| 欧美丰满美乳xxx高潮www| 久久国产精品无码网站| 亚洲欧洲三级电影| 精品国产乱码久久久久久图片| 色综合天天在线| 欧美一级爆毛片| 色欧美乱欧美15图片| 看片的网站亚洲| 亚洲精品少妇30p| 久久久久高清精品| 在线电影一区二区三区| 激情图片小说一区| 亚洲综合成人网| 国产精品妹子av| 欧美精品一区二区三区很污很色的 | 色婷婷av久久久久久久| 韩国v欧美v亚洲v日本v| 日韩**一区毛片| 亚洲国产日韩一级| 亚洲欧美一区二区不卡| 中文字幕欧美日韩一区| 久久婷婷成人综合色| 88在线观看91蜜桃国自产| 在线视频你懂得一区二区三区| 国产91高潮流白浆在线麻豆| 另类小说一区二区三区| 精品国产一区二区三区不卡| 欧美群妇大交群中文字幕| 91国偷自产一区二区三区观看| 成人免费电影视频| 国产经典欧美精品| 国产一区二区主播在线| 久久99精品久久久久婷婷| 日本不卡的三区四区五区| 亚洲18女电影在线观看| 亚洲成人免费看| 亚洲h动漫在线| 亚洲电影中文字幕在线观看| 亚洲一区二区三区精品在线| 亚洲蜜桃精久久久久久久| 91久久精品一区二区三| 91在线视频官网| 一本大道久久a久久精品综合 | 欧美伦理视频网站| 91福利资源站| 色香蕉久久蜜桃| 色婷婷久久久综合中文字幕| 91女厕偷拍女厕偷拍高清| 色婷婷亚洲精品| 欧美日韩一区二区三区在线| 欧美日韩国产大片| 欧美一区二区三区性视频| 免费欧美在线视频| 黄色精品一二区| 国产91精品精华液一区二区三区| 99在线视频精品| 色88888久久久久久影院野外| 欧美在线一二三四区| 在线一区二区三区四区五区| 欧洲一区二区三区在线| 欧美精品久久久久久久多人混战| 日韩一区二区三区四区五区六区| 欧美精品一区二区精品网| 国产午夜亚洲精品羞羞网站| 中文字幕中文字幕中文字幕亚洲无线| 国产精品久久久久四虎| 亚洲一区二区精品久久av| 免费看黄色91| 国产成人精品亚洲777人妖 | 精品国产网站在线观看| 精品国产欧美一区二区| 国产亚洲欧美一区在线观看| 国产精品高潮呻吟久久| 亚洲v精品v日韩v欧美v专区| 免费人成黄页网站在线一区二区| 国产不卡视频一区二区三区| 不卡av在线免费观看| 欧美日韩日日夜夜| 精品国产伦理网| 一区二区三区精品视频| 国产精品 欧美精品| 欧美性猛片xxxx免费看久爱| 欧美白人最猛性xxxxx69交| 国产精品激情偷乱一区二区∴| 一区二区三区**美女毛片| 久久99久久久欧美国产| av亚洲产国偷v产偷v自拍| 3d动漫精品啪啪一区二区竹菊| 久久众筹精品私拍模特| 亚洲黄一区二区三区| 国产一级精品在线| 欧美日韩在线不卡| 亚洲国产精品成人综合| 日韩中文欧美在线| 国产成人精品亚洲日本在线桃色| 欧美亚洲尤物久久| 国产精品三级av在线播放| 欧美另类一区二区三区| 中文在线资源观看网站视频免费不卡 | 国产乱一区二区| 欧美日韩和欧美的一区二区| 国产69精品久久久久777| 在线亚洲人成电影网站色www| 日韩一级黄色大片| 亚洲精品成人悠悠色影视| 国产一区二区三区久久悠悠色av| 欧美性色欧美a在线播放| 中文文精品字幕一区二区| 麻豆精品视频在线观看免费| 一区二区不卡在线播放 | 一区二区三区波多野结衣在线观看| 国产美女精品在线| 久久99精品久久久久久动态图| 色婷婷激情一区二区三区| 亚洲国产高清aⅴ视频| 美女视频网站久久| 91精品国产综合久久小美女| 一区二区三区四区高清精品免费观看| 国内精品伊人久久久久av一坑| 91传媒视频在线播放| 色综合天天天天做夜夜夜夜做| 欧美激情中文字幕| 国产一区二区三区香蕉| 日韩一区二区中文字幕| 亚洲最大色网站| 一本色道久久综合精品竹菊| 国产精品国产自产拍高清av王其| 日本一区二区三区四区| 精品伊人久久久久7777人| 日韩欧美在线1卡| 日本欧美肥老太交大片| 337p亚洲精品色噜噜狠狠| 天天做天天摸天天爽国产一区| 色婷婷av一区二区三区gif | 精品少妇一区二区三区在线视频| 亚洲一区二区三区四区在线 | 91丝袜呻吟高潮美腿白嫩在线观看| 久久久久久久电影| 国产成人一区在线| 国产欧美日韩亚州综合 | 99热在这里有精品免费| 国产精品每日更新在线播放网址 | 在线电影院国产精品| 日韩—二三区免费观看av| 5566中文字幕一区二区电影| 欧美少妇性性性| 亚洲午夜一区二区三区| 欧美视频在线一区二区三区 | 99精品视频一区二区| 亚洲人精品一区| 欧美视频一二三区| 日本欧美在线观看| www成人在线观看| 成人精品鲁一区一区二区| 自拍偷在线精品自拍偷无码专区| 99精品在线观看视频| 亚洲综合色噜噜狠狠| 欧美日本韩国一区二区三区视频 | 国产一区二区三区| 久久久久久黄色| 91丨九色porny丨蝌蚪| 亚洲www啪成人一区二区麻豆| 日韩欧美视频在线| 国产99久久久精品| 亚洲免费大片在线观看| 欧美精品一二三| 国产美女娇喘av呻吟久久| 亚洲欧洲美洲综合色网| 欧美日韩成人综合天天影院 | 亚洲柠檬福利资源导航| 一本一道久久a久久精品| 日韩国产欧美在线观看| 久久久久久久久久久99999| 91丝袜美腿高跟国产极品老师| 日本怡春院一区二区| 亚洲国产精品t66y| 91精品国产综合久久久蜜臀图片 | 亚洲成人一区在线| xf在线a精品一区二区视频网站| 国产一区三区三区| 亚洲最大成人网4388xx| 久久综合网色—综合色88| 99久久国产综合精品麻豆| 日韩二区三区四区| 国产午夜精品一区二区三区嫩草| 99久久婷婷国产| 久久97超碰国产精品超碰| 亚洲三级小视频| 欧美大片在线观看| 一本到不卡免费一区二区| 激情综合网av| 有码一区二区三区| 国产欧美精品在线观看| 欧美一级一区二区| 一本久道久久综合中文字幕|