MPLAB® Harmony Graphics Suite > Graphics Library > Legato Graphics Library > Files > legato_math.h
MPLAB® Harmony Graphics Suite
legato_math.h

Microchip Technology Inc.

File Name

legato_math.h

Description

Module for Microchip Graphics Library - Legato User Interface Library 

Math support functions.

Functions
 
Name 
Description 
 
Calculates the absolute value of a signed integer. 
 
Returns true if arc overlaps with quadrant 
 
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) 
 
Projects a point onto another point given a y coordinate. 
 
Projects a point onto another point given a x coordinate. 
 
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 lePercent 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. 
 
Sorts two points on the X axis. 
 
Sorts two points on the Y axis. 
Types
 
Name 
Description 
 
This is type LE_QUADRANT. 
 
This is type LE_TRIG_FUNCTION_TYPE. 
 
This is type leArcDir. 
MPLAB® Harmony Graphics Suite