⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 fttrigon.h

📁 一个Xpdf应用的例子
💻 H
📖 第 1 页 / 共 2 页
字号:
  /*    Return the tangent of a given angle in fixed point format.         */  /*                                                                       */  /* @input:                                                               */  /*    angle :: The input angle.                                          */  /*                                                                       */  /* @return:                                                              */  /*    The tangent value.                                                 */  /*                                                                       */  FT_EXPORT( FT_Fixed )  FT_Tan( FT_Angle  angle );  /*************************************************************************/  /*                                                                       */  /* @function:                                                            */  /*    FT_Atan2                                                           */  /*                                                                       */  /* @description:                                                         */  /*    Return the arc-tangent corresponding to a given vector (x,y) in    */  /*    the 2d plane.                                                      */  /*                                                                       */  /* @input:                                                               */  /*    x :: The horizontal vector coordinate.                             */  /*                                                                       */  /*    y :: The vertical vector coordinate.                               */  /*                                                                       */  /* @return:                                                              */  /*    The arc-tangent value (i.e. angle).                                */  /*                                                                       */  FT_EXPORT( FT_Angle )  FT_Atan2( FT_Fixed  x,            FT_Fixed  y );  /*************************************************************************/  /*                                                                       */  /* @function:                                                            */  /*    FT_Vector_Unit                                                     */  /*                                                                       */  /* @description:                                                         */  /*    Return the unit vector corresponding to a given angle.  After the  */  /*    call, the value of `vec.x' will be `sin(angle)', and the value of  */  /*    `vec.y' will be `cos(angle)'.                                      */  /*                                                                       */  /*    This function is useful to retrieve both the sinus and cosinus of  */  /*    a given angle quickly.                                             */  /*                                                                       */  /* @output:                                                              */  /*    vec   :: The address of target vector.                             */  /*                                                                       */  /* @input:                                                               */  /*    angle :: The address of angle.                                     */  /*                                                                       */  FT_EXPORT( void )  FT_Vector_Unit( FT_Vector*  vec,                  FT_Angle    angle );  /*************************************************************************/  /*                                                                       */  /* @function:                                                            */  /*    FT_Vector_Rotate                                                   */  /*                                                                       */  /* @description:                                                         */  /*    Rotate a vector by a given angle.                                  */  /*                                                                       */  /* @inout:                                                               */  /*    vec   :: The address of target vector.                             */  /*                                                                       */  /* @input:                                                               */  /*    angle :: The address of angle.                                     */  /*                                                                       */  FT_EXPORT( void )  FT_Vector_Rotate( FT_Vector*  vec,                    FT_Angle    angle );  /*************************************************************************/  /*                                                                       */  /* @function:                                                            */  /*   FT_Vector_Length                                                    */  /*                                                                       */  /* @description:                                                         */  /*   Return the length of a given vector.                                */  /*                                                                       */  /* @input:                                                               */  /*   vec :: The address of target vector.                                */  /*                                                                       */  /* @return:                                                              */  /*   The vector length, expressed in the same units that the original    */  /*   vector coordinates.                                                 */  /*                                                                       */  FT_EXPORT( FT_Fixed )  FT_Vector_Length( FT_Vector*  vec );  /*************************************************************************/  /*                                                                       */  /* @function:                                                            */  /*    FT_Vector_Normalize                                                */  /*                                                                       */  /* @description:                                                         */  /*    Normalize a given vector (i.e. compute the equivalent unit         */  /*    vector).                                                           */  /*                                                                       */  /* @inout:                                                               */  /*    vec :: The address of target vector.                               */  /*                                                                       */  FT_EXPORT( void )  FT_Vector_Normalize( FT_Vector*  vec );  /*************************************************************************/  /*                                                                       */  /* @function:                                                            */  /*    FT_Vector_Polarize                                                 */  /*                                                                       */  /* @description:                                                         */  /*    Compute both the length and angle of a given vector.               */  /*                                                                       */  /* @input:                                                               */  /*    vec    :: The address of source vector.                            */  /*                                                                       */  /* @output:                                                              */  /*    length :: The vector length.                                       */  /*    angle  :: The vector angle.                                        */  /*                                                                       */  FT_EXPORT( void )  FT_Vector_Polarize( FT_Vector*  vec,                      FT_Fixed   *length,                      FT_Angle   *angle );  /* */FT_END_HEADER#endif /* __FTTRIGON_H__ *//* END */

⌨️ 快捷键说明

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