misc/libfreetype/include/freetype/fttrigon.h
author koda
Thu, 25 Jul 2013 23:16:06 +0200
changeset 9371 f3840de881bd
parent 5172 88f2e05288ba
permissions -rw-r--r--
strip out our copy of libtremor SDL2_mixer comes with a more updated, better integrated version
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
5172
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
     1
/***************************************************************************/
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
     2
/*                                                                         */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
     3
/*  fttrigon.h                                                             */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
     4
/*                                                                         */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
     5
/*    FreeType trigonometric functions (specification).                    */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
     6
/*                                                                         */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
     7
/*  Copyright 2001, 2003, 2005, 2007 by                                    */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
     8
/*  David Turner, Robert Wilhelm, and Werner Lemberg.                      */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
     9
/*                                                                         */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    10
/*  This file is part of the FreeType project, and may only be used,       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    11
/*  modified, and distributed under the terms of the FreeType project      */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    12
/*  license, LICENSE.TXT.  By continuing to use, modify, or distribute     */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    13
/*  this file you indicate that you have read the license and              */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    14
/*  understand and accept it fully.                                        */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    15
/*                                                                         */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    16
/***************************************************************************/
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    17
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    18
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    19
#ifndef __FTTRIGON_H__
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    20
#define __FTTRIGON_H__
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    21
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    22
#include FT_FREETYPE_H
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    23
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    24
#ifdef FREETYPE_H
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    25
#error "freetype.h of FreeType 1 has been loaded!"
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    26
#error "Please fix the directory search order for header files"
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    27
#error "so that freetype.h of FreeType 2 is found first."
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    28
#endif
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    29
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    30
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    31
FT_BEGIN_HEADER
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    32
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    33
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    34
  /*************************************************************************/
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    35
  /*                                                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    36
  /* <Section>                                                             */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    37
  /*   computations                                                        */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    38
  /*                                                                       */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    39
  /*************************************************************************/
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    40
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    41
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    42
  /*************************************************************************
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    43
   *
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    44
   * @type:
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    45
   *   FT_Angle
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    46
   *
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    47
   * @description:
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    48
   *   This type is used to model angle values in FreeType.  Note that the
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    49
   *   angle is a 16.16 fixed float value expressed in degrees.
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    50
   *
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    51
   */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    52
  typedef FT_Fixed  FT_Angle;
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    53
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    54
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    55
  /*************************************************************************
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    56
   *
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    57
   * @macro:
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    58
   *   FT_ANGLE_PI
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    59
   *
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    60
   * @description:
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    61
   *   The angle pi expressed in @FT_Angle units.
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    62
   *
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    63
   */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    64
#define FT_ANGLE_PI  ( 180L << 16 )
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    65
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    66
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    67
  /*************************************************************************
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    68
   *
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    69
   * @macro:
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    70
   *   FT_ANGLE_2PI
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    71
   *
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    72
   * @description:
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    73
   *   The angle 2*pi expressed in @FT_Angle units.
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    74
   *
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    75
   */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    76
#define FT_ANGLE_2PI  ( FT_ANGLE_PI * 2 )
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    77
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    78
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    79
  /*************************************************************************
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    80
   *
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    81
   * @macro:
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    82
   *   FT_ANGLE_PI2
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    83
   *
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    84
   * @description:
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    85
   *   The angle pi/2 expressed in @FT_Angle units.
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    86
   *
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    87
   */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    88
#define FT_ANGLE_PI2  ( FT_ANGLE_PI / 2 )
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    89
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    90
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    91
  /*************************************************************************
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    92
   *
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    93
   * @macro:
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    94
   *   FT_ANGLE_PI4
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    95
   *
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    96
   * @description:
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    97
   *   The angle pi/4 expressed in @FT_Angle units.
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    98
   *
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
    99
   */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   100
#define FT_ANGLE_PI4  ( FT_ANGLE_PI / 4 )
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   101
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   102
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   103
  /*************************************************************************
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   104
   *
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   105
   * @function:
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   106
   *   FT_Sin
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   107
   *
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   108
   * @description:
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   109
   *   Return the sinus of a given angle in fixed point format.
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   110
   *
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   111
   * @input:
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   112
   *   angle ::
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   113
   *     The input angle.
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   114
   *
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   115
   * @return:
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   116
   *   The sinus value.
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   117
   *
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   118
   * @note:
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   119
   *   If you need both the sinus and cosinus for a given angle, use the
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   120
   *   function @FT_Vector_Unit.
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   121
   *
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   122
   */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   123
  FT_EXPORT( FT_Fixed )
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   124
  FT_Sin( FT_Angle  angle );
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   125
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   126
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   127
  /*************************************************************************
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   128
   *
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   129
   * @function:
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   130
   *   FT_Cos
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   131
   *
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   132
   * @description:
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   133
   *   Return the cosinus of a given angle in fixed point format.
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   134
   *
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   135
   * @input:
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   136
   *   angle ::
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   137
   *     The input angle.
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   138
   *
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   139
   * @return:
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   140
   *   The cosinus value.
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   141
   *
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   142
   * @note:
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   143
   *   If you need both the sinus and cosinus for a given angle, use the
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   144
   *   function @FT_Vector_Unit.
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   145
   *
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   146
   */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   147
  FT_EXPORT( FT_Fixed )
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   148
  FT_Cos( FT_Angle  angle );
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   149
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   150
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   151
  /*************************************************************************
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   152
   *
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   153
   * @function:
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   154
   *   FT_Tan
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   155
   *
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   156
   * @description:
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   157
   *   Return the tangent of a given angle in fixed point format.
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   158
   *
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   159
   * @input:
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   160
   *   angle ::
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   161
   *     The input angle.
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   162
   *
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   163
   * @return:
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   164
   *   The tangent value.
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   165
   *
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   166
   */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   167
  FT_EXPORT( FT_Fixed )
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   168
  FT_Tan( FT_Angle  angle );
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   169
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   170
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   171
  /*************************************************************************
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   172
   *
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   173
   * @function:
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   174
   *   FT_Atan2
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   175
   *
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   176
   * @description:
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   177
   *   Return the arc-tangent corresponding to a given vector (x,y) in
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   178
   *   the 2d plane.
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   179
   *
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   180
   * @input:
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   181
   *   x ::
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   182
   *     The horizontal vector coordinate.
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   183
   *
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   184
   *   y ::
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   185
   *     The vertical vector coordinate.
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   186
   *
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   187
   * @return:
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   188
   *   The arc-tangent value (i.e. angle).
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   189
   *
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   190
   */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   191
  FT_EXPORT( FT_Angle )
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   192
  FT_Atan2( FT_Fixed  x,
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   193
            FT_Fixed  y );
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   194
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   195
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   196
  /*************************************************************************
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   197
   *
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   198
   * @function:
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   199
   *   FT_Angle_Diff
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   200
   *
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   201
   * @description:
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   202
   *   Return the difference between two angles.  The result is always
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   203
   *   constrained to the ]-PI..PI] interval.
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   204
   *
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   205
   * @input:
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   206
   *   angle1 ::
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   207
   *     First angle.
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   208
   *
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   209
   *   angle2 ::
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   210
   *     Second angle.
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   211
   *
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   212
   * @return:
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   213
   *   Constrained value of `value2-value1'.
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   214
   *
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   215
   */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   216
  FT_EXPORT( FT_Angle )
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   217
  FT_Angle_Diff( FT_Angle  angle1,
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   218
                 FT_Angle  angle2 );
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   219
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   220
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   221
  /*************************************************************************
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   222
   *
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   223
   * @function:
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   224
   *   FT_Vector_Unit
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   225
   *
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   226
   * @description:
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   227
   *   Return the unit vector corresponding to a given angle.  After the
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   228
   *   call, the value of `vec.x' will be `sin(angle)', and the value of
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   229
   *   `vec.y' will be `cos(angle)'.
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   230
   *
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   231
   *   This function is useful to retrieve both the sinus and cosinus of a
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   232
   *   given angle quickly.
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   233
   *
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   234
   * @output:
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   235
   *   vec ::
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   236
   *     The address of target vector.
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   237
   *
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   238
   * @input:
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   239
   *   angle ::
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   240
   *     The address of angle.
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   241
   *
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   242
   */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   243
  FT_EXPORT( void )
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   244
  FT_Vector_Unit( FT_Vector*  vec,
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   245
                  FT_Angle    angle );
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   246
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   247
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   248
  /*************************************************************************
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   249
   *
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   250
   * @function:
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   251
   *   FT_Vector_Rotate
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   252
   *
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   253
   * @description:
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   254
   *   Rotate a vector by a given angle.
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   255
   *
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   256
   * @inout:
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   257
   *   vec ::
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   258
   *     The address of target vector.
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   259
   *
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   260
   * @input:
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   261
   *   angle ::
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   262
   *     The address of angle.
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   263
   *
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   264
   */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   265
  FT_EXPORT( void )
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   266
  FT_Vector_Rotate( FT_Vector*  vec,
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   267
                    FT_Angle    angle );
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   268
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   269
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   270
  /*************************************************************************
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   271
   *
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   272
   * @function:
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   273
   *   FT_Vector_Length
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   274
   *
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   275
   * @description:
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   276
   *   Return the length of a given vector.
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   277
   *
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   278
   * @input:
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   279
   *   vec ::
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   280
   *     The address of target vector.
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   281
   *
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   282
   * @return:
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   283
   *   The vector length, expressed in the same units that the original
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   284
   *   vector coordinates.
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   285
   *
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   286
   */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   287
  FT_EXPORT( FT_Fixed )
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   288
  FT_Vector_Length( FT_Vector*  vec );
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   289
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   290
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   291
  /*************************************************************************
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   292
   *
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   293
   * @function:
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   294
   *   FT_Vector_Polarize
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   295
   *
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   296
   * @description:
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   297
   *   Compute both the length and angle of a given vector.
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   298
   *
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   299
   * @input:
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   300
   *   vec ::
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   301
   *     The address of source vector.
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   302
   *
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   303
   * @output:
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   304
   *   length ::
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   305
   *     The vector length.
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   306
   *
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   307
   *   angle ::
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   308
   *     The vector angle.
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   309
   *
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   310
   */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   311
  FT_EXPORT( void )
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   312
  FT_Vector_Polarize( FT_Vector*  vec,
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   313
                      FT_Fixed   *length,
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   314
                      FT_Angle   *angle );
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   315
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   316
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   317
  /*************************************************************************
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   318
   *
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   319
   * @function:
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   320
   *   FT_Vector_From_Polar
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   321
   *
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   322
   * @description:
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   323
   *   Compute vector coordinates from a length and angle.
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   324
   *
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   325
   * @output:
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   326
   *   vec ::
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   327
   *     The address of source vector.
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   328
   *
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   329
   * @input:
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   330
   *   length ::
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   331
   *     The vector length.
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   332
   *
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   333
   *   angle ::
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   334
   *     The vector angle.
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   335
   *
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   336
   */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   337
  FT_EXPORT( void )
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   338
  FT_Vector_From_Polar( FT_Vector*  vec,
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   339
                        FT_Fixed    length,
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   340
                        FT_Angle    angle );
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   341
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   342
  /* */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   343
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   344
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   345
FT_END_HEADER
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   346
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   347
#endif /* __FTTRIGON_H__ */
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   348
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   349
88f2e05288ba aaand let's add freetype as well while we are at it
koda
parents:
diff changeset
   350
/* END */