MotorWare f2806x Module API Documentation
Data Structures | Macros | Typedefs | Functions
float/math.h File Reference

Contains the public interface to the math (MATH) module routines. More...

#include "sw/modules/types/src/types.h"

Go to the source code of this file.

Data Structures

struct  _MATH_vec2_
 Defines a two element vector. More...
 
struct  _MATH_vec3_
 Defines a three element vector. More...
 

Macros

#define MATH_Nm_TO_lbin_SF   ((float_t)(8.8507457913))
 Defines conversion scale factor from N*m to lb*in. More...
 
#define MATH_TWO_OVER_THREE   ((float_t)(0.66666666666666666666666666666667))
 Defines 2/3. More...
 
#define MATH_ONE_OVER_THREE   ((float_t)(0.33333333333333333333333333333333))
 Defines 1/3. More...
 
#define MATH_ONE_OVER_PI   ((float_t)(0.318309886183791))
 Defines 1/(pi) More...
 
#define MATH_ONE_OVER_SQRT_THREE   ((float_t)(0.57735026918962576450914878050196))
 Defines 1/sqrt(3) More...
 
#define MATH_ONE_OVER_FOUR_PI   ((float_t)(0.07957747154594767))
 Defines 1/(4*pi) More...
 
#define MATH_ONE_OVER_TWO_PI   ((float_t) (0.1591549430918954))
 Defines 1/(2*pi) More...
 
#define MATH_PI   ((float_t)(3.1415926535897932384626433832795))
 Defines pi. More...
 
#define MATH_PI_PU   ((float_t)(0.5))
 Defines pi per unit. More...
 
#define MATH_TWO_PI   ((float_t)(6.283185307179586))
 Defines 2*pi. More...
 
#define MATH_TWO_PI_PU   ((float_t)(1.0))
 Defines 2*pi per unit. More...
 
#define MATH_FOUR_PI   ((float_t)(12.56637061435917))
 Defines 4*pi. More...
 
#define MATH_FOUR_PI_PU   ((float_t)(2.0))
 Defines 4*pi per unit. More...
 
#define MATH_PI_OVER_TWO   ((float_t)(1.570796326794897))
 Defines pi/2. More...
 
#define MATH_PI_OVER_TWO_PU   ((float_t)(0.25))
 Defines pi/2 per unit. More...
 
#define MATH_PI_OVER_FOUR   ((float_t)(0.785398163397448))
 Defines pi/4. More...
 
#define MATH_PI_OVER_FOUR_PU   ((float_t)(0.125))
 Defines pi/4 per unit. More...
 

Typedefs

typedef struct _MATH_vec2_ MATH_vec2
 Defines a two element vector. More...
 
typedef struct _MATH_vec3_ MATH_vec3
 Defines a three element vector. More...
 

Functions

static float_t MATH_abs (const float_t in)
 Finds the absolute value. More...
 
static float_t MATH_incrAngle (const float_t angle_rad, const float_t angleDelta_rad)
 Increments an angle value and handles wrap-around. More...
 
static float_t MATH_sat (const float_t in, const float_t max, const float_t min)
 Saturates the input value between the minimum and maximum values. More...
 

Detailed Description

Contains the public interface to the math (MATH) module routines.

(C) Copyright 2011, Texas Instruments, Inc.

Definition in file float/math.h.