#include "fixed.h"#include <math.h>#include <stdlib.h>#include <string.h>#include <limits.h>#include <common/DefinesAssert.h>#include <common/DefinesString.h>#include <common/Logger.h>Go to the source code of this file.
Defines | |
| #define | _XPI 31415 |
| #define | _X2PI 62831 |
| #define | _XPIO2 15707 |
| #define | _XPIO4 7853 |
| #define | XPIO4 fixed(true, _XPIO4) |
| #define | _XLN_E 27182 |
| #define | XLN_E fixed(true,_XLN_E) |
| #define | _XLN_10 23025 |
| #define | XLN_10 fixed(true,_XLN_10) |
| #define | sqrt_step(shift) |
Functions | |
| int | fixed_internal_mult (int a, int b) |
| int | fixed_internal_div (int a, int b) |
| static int | iSqrt (int value) |
| fixed | absx (fixed p_Base) |
| static fixed | iLog2 (fixed p_Base) |
| static fixed | iExp2 (fixed p_Base) |
| static fixed | ipow (fixed p_Base, fixed p_Power) |
| static fixed | ilog10 (fixed p_Base) |
| fixed | sqrtx (fixed fixedVal) |
| fixed | powx (fixed fixedVal, fixed fixedPower) |
| fixed | expx (fixed fixedVal) |
| fixed | log10x (fixed fixedVal) |
| fixed | logx (fixed fixedVal) |
| fixed | floorx (fixed fixedVal) |
| fixed | ceilx (fixed fixedVal) |
| static fixed | _sinx (fixed x) |
| fixed | sinx (fixed x) |
| fixed | cosx (fixed x) |
| fixed | tanx (fixed x) |
| static fixed | _atanx (fixed f, int n) |
| fixed | atanx (fixed x) |
| fixed | atan2x (fixed v, fixed u) |
Variables | |
| static fixed | CON1 (true, 2679) |
| static fixed | ROOT_3M1 (true, 7321) |
| static fixed | ROOT_3 (true, 17321) |
| static fixed | p0 = fixed(true, -136887) |
| static fixed | p1 = fixed(true, -205058) |
| static fixed | p2 = fixed(true, -84946) |
| static fixed | p3 = fixed(true, -8375) |
| static fixed | q0 = fixed(true, 410663) |
| static fixed | q1 = fixed(true, 861573) |
| static fixed | q2 = fixed(true, 595784) |
| static fixed | q3 = fixed(true, 150240) |
| static fixed | at [] |
| #define _X2PI 62831 |
| #define _XPIO2 15707 |
| #define sqrt_step | ( | shift | ) |
Definition at line 380 of file fixed.cpp.
References fixed::fixed().
Referenced by fixed::cos(), and fixed::sin().
Definition at line 550 of file fixed.cpp.
Referenced by WeaponRedirect::fireWeapon(), TankLib::getShotTowardsPosition(), TankLib::getSniperShotTowardsPosition(), TankMovement::init(), TankAIAimGuesser::refineShot(), TargetMovementEntrySpline::simulate(), TargetMovementEntryShips::simulate(), and Boid2::update().
| int fixed_internal_div | ( | int | a, | |
| int | b | |||
| ) | [inline] |
Definition at line 61 of file fixed.cpp.
References FIXED_RESOLUTION, and int().
Referenced by fixed::operator/(), and fixed::operator/=().
| int fixed_internal_mult | ( | int | a, | |
| int | b | |||
| ) | [inline] |
Definition at line 47 of file fixed.cpp.
References FIXED_RESOLUTION, and int().
Referenced by fixed::operator *(), and fixed::operator *=().
Definition at line 279 of file fixed.cpp.
References fixed::fixed().
Referenced by fixed::exp(), and ipow().
Definition at line 299 of file fixed.cpp.
References iLog2(), and XLN_10.
Referenced by fixed::log10().
Definition at line 245 of file fixed.cpp.
References absx(), fixed::fixed(), and XLN_E.
Referenced by ilog10(), ipow(), and fixed::log().
Definition at line 291 of file fixed.cpp.
References absx(), fixed::fixed(), iExp2(), and iLog2().
Referenced by fixed::pow().
| static int iSqrt | ( | int | value | ) | [static] |
Initial value:
{
0,
fixed(true, 5235),
fixed::XPIO2,
fixed(true, 10472)
}
Definition at line 513 of file fixed.cpp.
Referenced by TargetCamera::moveCamera(), and TargetCamera::resetCam().
Definition at line 505 of file fixed.cpp.
Referenced by Hemisphere::draw(), Hemisphere::drawColored(), and ServerWebHandler::StatsHandler::processRequest().
Definition at line 506 of file fixed.cpp.
Referenced by Hemisphere::draw(), Hemisphere::drawColored(), and ServerWebHandler::StatsHandler::processRequest().
1.5.3