fmaths.inc

来自「著名的游戏开发库Allegro4.2.0 for DELPHI」· INC 代码 · 共 40 行

INC
40
字号
{*         ______   ___    ___
 *        /\  _  \ /\_ \  /\_ \
 *        \ \ \L\ \\//\ \ \//\ \      __     __   _ __   ___
 *         \ \  __ \ \ \ \  \ \ \   /'__`\ /'_ `\/\`'__\/ __`\
 *          \ \ \/\ \ \_\ \_ \_\ \_/\  __//\ \L\ \ \ \//\ \L\ \
 *           \ \_\ \_\/\____\/\____\ \____\ \____ \ \_\\ \____/
 *            \/_/\/_/\/____/\/____/\/____/\/___L\ \/_/ \/___/
 *                                           /\____/
 *                                           \_/__/
 *
 *      Fixed point math routines.
 *
 *      By Shawn Hargreaves.
 *
 *      See readme.txt for copyright information.
 *}
{$IFDEF ALLEGRO_INTERFACE}
var
  fixsqrt: function(x: fixed): fixed; cdecl;
  fixhypot: function(x, y: fixed): fixed; cdecl;
  fixatan: function(x: fixed): fixed; cdecl;
  fixatan2: function(y, x: fixed): fixed; cdecl;

  _cos_tbl: p_fixeds;
  _tan_tbl: p_fixeds;
  _acos_tbl: p_fixeds;
{$ENDIF ALLEGRO_INTERFACE}
{$IFDEF ALLEGRO_IMPLEMENTATION}
{$ENDIF ALLEGRO_IMPLEMENTATION}
{$IFDEF ALLEGRO_LOADVARIABLE}
  fixsqrt   := LoadDLL('fixsqrt');
  fixhypot  := LoadDLL('fixhypot');
  fixatan   := LoadDLL('fixatan');
  fixatan2  := LoadDLL('fixatan2');
  _cos_tbl  := LoadDLL('_cos_tbl');
  _tan_tbl  := LoadDLL('_tan_tbl');
  _acos_tbl := LoadDLL('_acos_tbl');
{$ENDIF ALLEGRO_LOADVARIABLE}

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?