亚洲欧美第一页_禁久久精品乱码_粉嫩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一区二区三区免费野_久草精品视频
国产午夜精品一区二区| 亚洲电影中文字幕在线观看| 日韩免费电影一区| 91精品国产综合久久久久久久 | 久久久久久久av麻豆果冻| 欧美区在线观看| 欧美成人官网二区| 久久久久久久久久久久久久久99| 2023国产精品| 国产精品久久影院| 亚洲成人动漫一区| 国产一区二区三区精品视频| 亚洲精品一线二线三线无人区| 国产精品视频一二三| 亚洲黄色性网站| 九九视频精品免费| 91丨porny丨最新| 欧美一区二区视频在线观看| 国产欧美一区二区精品忘忧草| 亚洲激情综合网| 精品一区免费av| 色综合天天综合网天天看片| 精品精品国产高清a毛片牛牛| 国产精品传媒在线| 免费欧美日韩国产三级电影| av在线一区二区| 国产偷v国产偷v亚洲高清| 一区二区三区在线看| 国产馆精品极品| 欧美一级xxx| 日韩av成人高清| 欧美日韩激情一区二区三区| 国产精品的网站| 一本久道久久综合中文字幕| 欧美精品视频www在线观看| 亚洲欧美综合色| 成人av免费在线观看| 国产性色一区二区| 精品一区二区三区在线播放视频 | 免费在线观看视频一区| av亚洲精华国产精华精华| 久久久天堂av| 国产乱人伦偷精品视频不卡| 欧美tickle裸体挠脚心vk| 国产乱妇无码大片在线观看| 亚洲国产精品影院| 欧美日韩亚洲综合一区二区三区 | 一区二区三区久久久| 日本丶国产丶欧美色综合| 中文字幕欧美三区| 成人污视频在线观看| 国产精品久久久久久久裸模| 成人avav在线| 国产精品国产a级| 波波电影院一区二区三区| 综合av第一页| 欧美卡1卡2卡| 国内一区二区视频| 中文字幕一区av| 6080国产精品一区二区| 日韩电影在线免费观看| 91精品国产麻豆国产自产在线| 青青草97国产精品免费观看无弹窗版| 91精品国产综合久久久蜜臀粉嫩| 美女一区二区在线观看| 国产亚洲欧美日韩在线一区| 色综合久久中文综合久久97| 国产乱子轮精品视频| 久久99精品国产麻豆婷婷洗澡| 色久综合一二码| 亚洲三级小视频| 国产福利91精品一区| 欧美成人video| 欧美成人女星排名| 日韩国产欧美三级| 91欧美一区二区| 国产午夜亚洲精品羞羞网站| 麻豆91精品视频| 不卡一区中文字幕| 亚洲一区二区三区四区五区中文| 欧美日本在线一区| 成人黄色大片在线观看| 秋霞国产午夜精品免费视频| 精品国产免费视频| 99精品一区二区| 国产精品香蕉一区二区三区| 日产国产高清一区二区三区| 一区二区高清免费观看影视大全| 国产精品国产精品国产专区不蜜 | 欧美视频在线一区| 国产+成+人+亚洲欧洲自线| 精品一二三四区| 免费成人深夜小野草| 日本不卡视频在线| 日韩电影一区二区三区四区| 一区二区高清视频在线观看| 一区二区三区欧美| 欧美激情综合在线| 国产一区福利在线| 久久精品噜噜噜成人av农村| 麻豆精品在线看| 亚洲尤物在线视频观看| 亚洲国产综合人成综合网站| 亚洲免费大片在线观看| 亚洲色图在线看| 国产精品大尺度| 亚洲精品视频在线看| 婷婷久久综合九色综合伊人色| 久热成人在线视频| 国产成人综合在线观看| 久久精品国产成人一区二区三区 | 免费人成网站在线观看欧美高清| 国产69精品久久久久777| 欧美又粗又大又爽| 中文一区在线播放| 五月天网站亚洲| 国产成人高清在线| av在线不卡电影| 欧美三级电影网站| 国产女主播在线一区二区| 亚洲va韩国va欧美va| 国产乱码字幕精品高清av| 99精品偷自拍| 日韩欧美一区二区视频| 国产精品久久久久久户外露出 | 亚洲一区二区视频在线观看| 午夜成人在线视频| 国产在线播放一区三区四| 久久亚洲综合色| 亚洲国产精品自拍| 国产高清亚洲一区| 3d动漫精品啪啪| 天天综合色天天综合色h| 成人激情视频网站| 欧美激情资源网| 国产一区二区三区香蕉| 欧美一级日韩不卡播放免费| 一区二区在线观看免费视频播放| 国内精品视频一区二区三区八戒| 91老师国产黑色丝袜在线| 国产女主播一区| 99re这里只有精品6| 欧美精品一区二区三| 一区二区不卡在线播放 | 91精品国产91综合久久蜜臀| 偷窥少妇高潮呻吟av久久免费| 99久久婷婷国产综合精品| 久久久久99精品国产片| 紧缚奴在线一区二区三区| 欧美高清视频www夜色资源网| 视频一区二区三区中文字幕| 欧美一区二区大片| 国产毛片精品一区| 26uuu国产在线精品一区二区| 麻豆成人久久精品二区三区小说| 日韩一区二区免费高清| 日韩1区2区日韩1区2区| 69久久夜色精品国产69蝌蚪网| 蜜臀av在线播放一区二区三区| 欧美不卡一二三| 国产成人99久久亚洲综合精品| 亚洲人快播电影网| 91精品在线一区二区| 中文字幕一区二区三区精华液| 麻豆91免费看| 中文字幕精品一区二区三区精品| www.欧美日韩| 日韩电影一区二区三区四区| 久久亚洲二区三区| 在线一区二区视频| 性做久久久久久久久| 精品国产91久久久久久久妲己| 国产成人aaaa| 日本不卡在线视频| 亚洲丝袜另类动漫二区| 欧美日韩高清一区二区三区| 国产精品资源网站| 亚洲.国产.中文慕字在线| 久久综合资源网| 色综合视频一区二区三区高清| 丝袜亚洲另类欧美| 精品国产91洋老外米糕| 91久久久免费一区二区| 久久99久久99精品免视看婷婷 | 国产美女视频一区| 日韩电影一二三区| 亚洲国产一区二区在线播放| 国产精品女上位| 欧美国产精品中文字幕| 久久久一区二区三区捆绑**| 欧美一级欧美三级在线观看| 91美女片黄在线观看91美女| 狠狠网亚洲精品| 日本三级亚洲精品| 一级女性全黄久久生活片免费| 欧美激情中文不卡| 精品国精品自拍自在线| 欧美精品一级二级| 69av一区二区三区| 91精品国产综合久久久久久久久久|