MPLAB® Harmony Graphics Suite > Graphics Library > Aria Graphics Library > Aria Graphics Utilities Library > Files > gfx_math.h
MPLAB® Harmony Graphics Suite
gfx_math.h

Microchip Technology Inc.

File Name
Description

Module for Microchip Graphics Library - Hardware Abstraction Layer 

Math support functions.

Enumerations
 
Name 
Description 
 
This is type GFX_TRIG_FUNCTION_TYPE. 
Functions
 
Name 
Description 
 
Calculates the absolute value of a signed integer. 
 
Performs the inverse tangent operation 
 
Clamps a float between a min and max 
 
Clamps an integer between a min and max 
 
Calculates integer division of num/denom with rounding based on LSB/2. 
 
Performs a cosine lookup to determine the points in an arc at specified radius and angle (polar > cartesian conversion) 
 
Performs a linear interpolation of an integer based on a percentage between two signed points. 
 
Returns the larger of two floats. 
 
Returns the larger of two integers. 
 
Returns the smaller of two floats. 
 
Returns the smaller of two integers. 
 
normalize an angle between 0 - 360 
 
Calculates the percentage of one number when applied to another. Integer based. Accuracy for higher numbers is not guaranteed.
The result is the decimal percentage multiplied by 100. 
 
Calculates the percentage of a number. Returns a whole number with no decimal component. 
 
Calculates the percentage of a number. Returns a whole number and the tenths digit decimal component. 
 
Calculates the percentage of one number when applied to another. Integer based. Accuracy for higher numbers is not guaranteed.
The difference between this and GFX_Percent is that the decimal portion of the whole number is rounded off. 
 
Performs a cosine lookup to determine the points in an arc at specified radius and angle (polar to Cartesian conversion) 
 
Scales an integer from one number range of 0 -> n0 to another range 0 -> n1 based on percentages. 
 
Scales a signed integer from one number range of 0 -> n0 to another range 0 -> n1 based on percentages. 
 
Performs a cosine lookup to determine the result of sine/cosine 
MPLAB® Harmony Graphics Suite