MiniGUI API Reference (MiniGUI-Threads)
v3.2.0
A mature and proven cross-platform GUI system for embedded and smart IoT devices
|
This file includes fixed point and three-dimension math routines. More...
#include <errno.h>
#include <math.h>
#include <stdlib.h>
Go to the source code of this file.
Functions | |
MG_EXPORT fixed | fixsqrt (fixed x) |
Returns the non-negative square root of a fixed point value. More... | |
MG_EXPORT fixed | fixhypot (fixed x, fixed y) |
Returns the Euclidean distance from the origin. More... | |
MG_EXPORT fixed | fixatan (fixed x) |
Calculates the arc tangent of a fixed point value. More... | |
MG_EXPORT fixed | fixatan2 (fixed y, fixed x) |
Calculates the arc tangent of two fixed point variables. More... | |
static fixed | ftofix (double x) |
Converts a float point value to a fixed point value. More... | |
static double | fixtof (fixed x) |
Converts a fixed point value to a float point value. More... | |
static fixed | fixadd (fixed x, fixed y) |
Returns the sum of two fixed point values. More... | |
static fixed | fixsub (fixed x, fixed y) |
Subtract a fixed point value from another. More... | |
MG_EXPORT fixed | fixmul (fixed x, fixed y) |
Returns the product of two fixed point values. More... | |
MG_EXPORT fixed | fixdiv (fixed x, fixed y) |
Returns the quotient of two fixed point values. More... | |
static int | fixceil (fixed x) |
Rounds a fixed point value to the nearest integer. More... | |
static fixed | itofix (int x) |
Converts an integer to a fixed point value. More... | |
static int | fixtoi (fixed x) |
Converts an fixed point value to an integer. More... | |
static fixed | fixcos (fixed x) |
Returns the cosine of a fixed point. More... | |
static fixed | fixsin (fixed x) |
Returns the sine of a fixed point. More... | |
static fixed | fixtan (fixed x) |
Returns the tangent of a fixed point. More... | |
static fixed | fixacos (fixed x) |
Calculates and returns the arc cosine of a fixed point. More... | |
static fixed | fixasin (fixed x) |
Calculates and returns the arc sine of a fixed point. More... | |
This file includes fixed point and three-dimension math routines.
This file is part of MiniGUI, a mature cross-platform windowing and Graphics User Interface (GUI) support system for embedded systems and smart IoT devices. Copyright (C) 2002~2018, Beijing FMSoft Technologies Co., Ltd. Copyright (C) 1998~2002, WEI Yongming 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 3 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, see <http://www.gnu.org/licenses/>. Or, As this program is a library, any link to this program must follow GNU General Public License version 3 (GPLv3). If you cannot accept GPLv3, you need to be licensed from FMSoft. If you have got a commercial license of this program, please use it under the terms and conditions of the commercial license. For more information about the commercial license, please refer to <http://www.minigui.com/en/about/licensing-policy/>.
Definition in file fixedmath.h.