zenilib  0.5.3.0
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
fttrigon.c File Reference
#include <ft2build.h>
#include <FT_INTERNAL_OBJECTS_H>
#include <FT_TRIGONOMETRY_H>

Go to the source code of this file.

Macros

#define FT_SIGN_INT(x)   ( (x) >> ( FT_SIZEOF_INT * 8 - 1 ) )
 
#define FT_SIGN_INT16(x)   ( (x) >> 15 )
 
#define FT_SIGN_INT32(x)   ( (x) >> 31 )
 
#define FT_SIGN_LONG(x)   ( (x) >> ( FT_SIZEOF_LONG * 8 - 1 ) )
 
#define FT_TRIG_COSCALE   0x11616E8EUL
 
#define FT_TRIG_MAX_ITERS   23
 
#define FT_TRIG_SCALE   1166391785UL /* 0x4585BA38UL */
 

Functions

 FT_Angle_Diff (FT_Angle angle1, FT_Angle angle2)
 
 FT_Atan2 (FT_Fixed dx, FT_Fixed dy)
 
 FT_Cos (FT_Angle angle)
 
 FT_Sin (FT_Angle angle)
 
 FT_Tan (FT_Angle angle)
 
static FT_Fixed ft_trig_downscale (FT_Fixed val)
 
static FT_Int ft_trig_prenorm (FT_Vector *vec)
 
static void ft_trig_pseudo_polarize (FT_Vector *vec)
 
static void ft_trig_pseudo_rotate (FT_Vector *vec, FT_Angle theta)
 
 FT_Vector_From_Polar (FT_Vector *vec, FT_Fixed length, FT_Angle angle)
 
 FT_Vector_Length (FT_Vector *vec)
 
 FT_Vector_Polarize (FT_Vector *vec, FT_Fixed *length, FT_Angle *angle)
 
 FT_Vector_Rotate (FT_Vector *vec, FT_Angle angle)
 
 FT_Vector_Unit (FT_Vector *vec, FT_Angle angle)
 

Variables

static const FT_Fixed ft_trig_arctan_table [24]
 

Macro Definition Documentation

#define FT_SIGN_INT (   x)    ( (x) >> ( FT_SIZEOF_INT * 8 - 1 ) )

Definition at line 409 of file fttrigon.c.

#define FT_SIGN_INT16 (   x)    ( (x) >> 15 )

Definition at line 411 of file fttrigon.c.

#define FT_SIGN_INT32 (   x)    ( (x) >> 31 )

Definition at line 410 of file fttrigon.c.

#define FT_SIGN_LONG (   x)    ( (x) >> ( FT_SIZEOF_LONG * 8 - 1 ) )

Definition at line 408 of file fttrigon.c.

Referenced by FT_Vector_Rotate().

#define FT_TRIG_COSCALE   0x11616E8EUL

Definition at line 25 of file fttrigon.c.

Referenced by FT_Cos(), FT_Tan(), and FT_Vector_Unit().

#define FT_TRIG_MAX_ITERS   23

Definition at line 28 of file fttrigon.c.

Referenced by ft_trig_pseudo_polarize(), and ft_trig_pseudo_rotate().

#define FT_TRIG_SCALE   1166391785UL /* 0x4585BA38UL */

Definition at line 39 of file fttrigon.c.

Referenced by ft_trig_downscale().

Function Documentation

FT_Sin ( FT_Angle  angle)
FT_Tan ( FT_Angle  angle)

Definition at line 358 of file fttrigon.c.

References FT_DivFix(), FT_TRIG_COSCALE, ft_trig_pseudo_rotate(), FT_Vector_::x, and FT_Vector_::y.

Referenced by ft_stroker_inside(), and test_tan().

static FT_Fixed ft_trig_downscale ( FT_Fixed  val)
static

Definition at line 65 of file fttrigon.c.

References FT_TRIG_SCALE, and cordic::hi.

Referenced by FT_Vector_Length(), FT_Vector_Polarize(), and FT_Vector_Rotate().

static FT_Int ft_trig_prenorm ( FT_Vector vec)
static

Definition at line 100 of file fttrigon.c.

References FT_Vector_::x, and FT_Vector_::y.

Referenced by FT_Atan2(), FT_Vector_Length(), FT_Vector_Polarize(), and FT_Vector_Rotate().

static void ft_trig_pseudo_polarize ( FT_Vector vec)
static
static void ft_trig_pseudo_rotate ( FT_Vector vec,
FT_Angle  theta 
)
static
FT_Vector_Polarize ( FT_Vector vec,
FT_Fixed length,
FT_Angle angle 
)
FT_Vector_Rotate ( FT_Vector vec,
FT_Angle  angle 
)
FT_Vector_Unit ( FT_Vector vec,
FT_Angle  angle 
)

Definition at line 395 of file fttrigon.c.

References FT_TRIG_COSCALE, and ft_trig_pseudo_rotate().

Referenced by test_unit().

Variable Documentation

const FT_Fixed ft_trig_arctan_table[24]
static
Initial value:
=
{
4157273L, 2949120L, 1740967L, 919879L, 466945L, 234379L, 117304L,
58666L, 29335L, 14668L, 7334L, 3667L, 1833L, 917L, 458L, 229L, 115L,
57L, 29L, 14L, 7L, 4L, 2L, 1L
}

Definition at line 31 of file fttrigon.c.

Referenced by ft_trig_pseudo_polarize(), and ft_trig_pseudo_rotate().