< prev index next >

src/java.desktop/share/native/libfreetype/src/base/fttrigon.c

Print this page


   1 /****************************************************************************
   2  *
   3  * fttrigon.c
   4  *
   5  *   FreeType trigonometric functions (body).
   6  *
   7  * Copyright (C) 2001-2019 by
   8  * David Turner, Robert Wilhelm, and Werner Lemberg.
   9  *
  10  * This file is part of the FreeType project, and may only be used,
  11  * modified, and distributed under the terms of the FreeType project
  12  * license, LICENSE.TXT.  By continuing to use, modify, or distribute
  13  * this file you indicate that you have read the license and
  14  * understand and accept it fully.
  15  *
  16  */
  17 
  18   /**************************************************************************
  19    *
  20    * This is a fixed-point CORDIC implementation of trigonometric
  21    * functions as well as transformations between Cartesian and polar
  22    * coordinates.  The angles are represented as 16.16 fixed-point values
  23    * in degrees, i.e., the angular resolution is 2^-16 degrees.  Note that
  24    * only vectors longer than 2^16*180/pi (or at least 22 bits) on a
  25    * discrete Cartesian grid can have the same or better angular
  26    * resolution.  Therefore, to maintain this precision, some functions
  27    * require an interim upscaling of the vectors, whereas others operate


   1 /****************************************************************************
   2  *
   3  * fttrigon.c
   4  *
   5  *   FreeType trigonometric functions (body).
   6  *
   7  * Copyright (C) 2001-2020 by
   8  * David Turner, Robert Wilhelm, and Werner Lemberg.
   9  *
  10  * This file is part of the FreeType project, and may only be used,
  11  * modified, and distributed under the terms of the FreeType project
  12  * license, LICENSE.TXT.  By continuing to use, modify, or distribute
  13  * this file you indicate that you have read the license and
  14  * understand and accept it fully.
  15  *
  16  */
  17 
  18   /**************************************************************************
  19    *
  20    * This is a fixed-point CORDIC implementation of trigonometric
  21    * functions as well as transformations between Cartesian and polar
  22    * coordinates.  The angles are represented as 16.16 fixed-point values
  23    * in degrees, i.e., the angular resolution is 2^-16 degrees.  Note that
  24    * only vectors longer than 2^16*180/pi (or at least 22 bits) on a
  25    * discrete Cartesian grid can have the same or better angular
  26    * resolution.  Therefore, to maintain this precision, some functions
  27    * require an interim upscaling of the vectors, whereas others operate


< prev index next >