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

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

?? fixedmath.h

?? 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) 2002-2005 Feynman Software.    Copyright (C) 1998-2002 Wei Yongming.    This file is part of MiniGUI, a compact cross-platform Graphics     User Interface (GUI) support system for real-time embedded systems.    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    If you are using MiniGUI for developing commercial, proprietary, or other    software not covered by the GPL terms, you must have a commercial license    for MiniGUI. Please see http://www.minigui.com/product/index.html for     how to obtain this. If you are interested in the commercial MiniGUI     licensing, please write to sales@minigui.com.  \endverbatim *//* * $Id: fixedmath.h,v 1.23 2005/02/15 05:00:07 weiym Exp $ * *             MiniGUI for Linux/uClinux, eCos, uC/OS-II, VxWorks,  *                     and ThreadX version 1.6.x *             Copyright (C) 2002-2005 Feynman Software. *             Copyright (C) 1998-2002 Wei Yongming. * *             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 */

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
天涯成人国产亚洲精品一区av| 欧美国产日韩一二三区| 国产伦理精品不卡| 亚洲免费三区一区二区| 欧美一区二区精美| 色婷婷久久久综合中文字幕| 久久99深爱久久99精品| 亚洲一区在线播放| 久久久不卡影院| 这里只有精品99re| 色综合天天综合在线视频| 国产做a爰片久久毛片| 亚洲国产一区二区三区青草影视 | 色综合天天做天天爱| 精东粉嫩av免费一区二区三区| 亚洲精品国久久99热| 久久久久久久电影| 欧美一级二级三级乱码| 色女孩综合影院| www.亚洲激情.com| 国产一区 二区 三区一级| 日韩不卡一区二区三区| 亚洲综合丁香婷婷六月香| 国产精品久久久久天堂| 久久久久久久网| 精品毛片乱码1区2区3区| 欧美日韩大陆一区二区| 在线视频欧美区| 色综合久久久久综合| 成人av资源在线观看| 国产在线观看免费一区| 久久机这里只有精品| 男女男精品视频| 丝袜亚洲另类丝袜在线| 午夜日韩在线观看| 亚洲国产裸拍裸体视频在线观看乱了| 17c精品麻豆一区二区免费| 欧美经典一区二区| 国产视频一区二区三区在线观看 | 国产日韩欧美不卡| 欧美精品一区二区三区蜜桃视频| 日韩一区二区三| 精品毛片乱码1区2区3区| 欧美电影免费观看高清完整版在| 欧美剧情电影在线观看完整版免费励志电影 | 亚洲色欲色欲www在线观看| 中文字幕高清不卡| 中文字幕一区二区不卡| 成人欧美一区二区三区1314| 中文字幕日韩精品一区| 亚洲三级在线免费| 亚洲精品免费一二三区| 亚洲精品视频在线| 日日夜夜免费精品视频| 麻豆一区二区99久久久久| 国产麻豆精品在线| aaa国产一区| 欧美亚洲国产一区在线观看网站| 精品视频色一区| 91麻豆精品国产自产在线 | 欧美国产视频在线| 亚洲日本丝袜连裤袜办公室| 性欧美大战久久久久久久久| 麻豆成人在线观看| 国产福利一区在线观看| 91麻豆蜜桃一区二区三区| 欧美日韩国产一区二区三区地区| 欧美一区二区在线不卡| 国产视频不卡一区| 亚洲最新视频在线播放| 久久精品av麻豆的观看方式| 亚洲一区在线观看视频| 日韩精品电影在线| 国产成人啪免费观看软件| 成人国产精品视频| 欧美午夜一区二区三区 | 91麻豆精品国产综合久久久久久| 日韩欧美国产午夜精品| 国产日韩亚洲欧美综合| 日韩理论在线观看| 亚洲激情在线激情| 国产在线播精品第三| 91在线免费看| 欧美精品久久一区| 久久久亚洲午夜电影| 国产精品久久久久久亚洲毛片| 亚洲蜜臀av乱码久久精品| 亚洲18影院在线观看| 另类小说综合欧美亚洲| 成人激情开心网| 欧美日韩精品欧美日韩精品| 精品三级在线看| 亚洲免费三区一区二区| 美女www一区二区| heyzo一本久久综合| 欧美丰满少妇xxxxx高潮对白| 国产午夜精品在线观看| 亚洲一区二区三区在线播放| 狠狠v欧美v日韩v亚洲ⅴ| 色狠狠桃花综合| 亚洲精品一区二区精华| 亚洲免费观看高清完整版在线| 日本免费在线视频不卡一不卡二| 国产成人免费高清| 91国偷自产一区二区使用方法| 2014亚洲片线观看视频免费| 亚洲精品视频在线看| 国产精品亚洲专一区二区三区| 色婷婷激情久久| 2020日本不卡一区二区视频| 一区二区三区欧美日韩| 国产一区二区精品久久91| 一本一道波多野结衣一区二区| 日本一区二区三区视频视频| 蜜臀av在线播放一区二区三区| 成人av影院在线| 欧美videofree性高清杂交| 亚洲手机成人高清视频| 国产一区二区在线影院| 欧美日韩精品欧美日韩精品| 日本一区二区三区四区在线视频 | 日韩欧美一级在线播放| 亚洲国产一区二区视频| 高清在线成人网| 欧美大片拔萝卜| 亚洲制服丝袜av| 97久久超碰国产精品| 欧美激情在线看| 国产一区二区主播在线| 欧美日韩国产精品自在自线| 一区二区国产视频| gogogo免费视频观看亚洲一| 国产亚洲欧美在线| 精品一区二区免费| 欧美一级理论片| 五月天亚洲精品| 日本韩国欧美一区| 亚洲免费观看高清完整版在线观看熊| 成人一区二区在线观看| 2021中文字幕一区亚洲| 韩日欧美一区二区三区| 日韩视频123| 青青草国产精品亚洲专区无| 欧美精品在线一区二区三区| 日本特黄久久久高潮| 欧美精品色综合| 婷婷激情综合网| 欧美理论片在线| 蜜臀va亚洲va欧美va天堂| 欧美一区二区三区四区高清| 日本不卡一区二区| 日韩欧美一级在线播放| 麻豆精品在线播放| 精品日韩成人av| 国产尤物一区二区| 久久精品在线免费观看| 国产福利一区在线| 久久久精品tv| zzijzzij亚洲日本少妇熟睡| 18欧美乱大交hd1984| 欧美综合色免费| 奇米影视一区二区三区| 久久综合网色—综合色88| 国产成人亚洲综合色影视| 国产精品久久久久久久久免费相片| 国产91在线观看丝袜| 中文字幕一区二区三区四区不卡 | 久久99精品久久久久久动态图| 欧美一级在线免费| 国产在线不卡一区| 国产精品―色哟哟| 一本久久精品一区二区| 日韩1区2区3区| 久久久一区二区三区| 99精品黄色片免费大全| 亚洲va欧美va人人爽| 日韩一区二区在线看片| 狠狠色丁香久久婷婷综| ...av二区三区久久精品| 色老汉一区二区三区| 久久国产精品第一页| 国产精品五月天| 欧美色图在线观看| 国产在线麻豆精品观看| 国产精品九色蝌蚪自拍| 在线观看91视频| 国产1区2区3区精品美女| 亚洲一区免费视频| 精品国产不卡一区二区三区| 99免费精品在线观看| 日韩制服丝袜av| 久久久精品蜜桃| 在线观看日韩一区| 国产精品69毛片高清亚洲| 亚洲资源中文字幕| 国产午夜一区二区三区| 欧美欧美欧美欧美首页| 国产白丝网站精品污在线入口| 一区二区三区在线视频免费| 国产人成一区二区三区影院|