MPLAB® Harmony Graphics Suite > Graphics Library > Legato Graphics Library > Legato Interface > a) Common Functions > leGetXGivenYOnLine Function
MPLAB® Harmony Graphics Suite
leGetXGivenYOnLine Function

Projects a point onto another point given a y coordinate.

C
int32_t leGetXGivenYOnLine(
    lePoint p1, 
    lePoint p2, 
    int32_t y
);
Parameters
Parameters 
Description 
lePoint p1 
the first point 
lePoint p2 
the second point 
int32_t y 
the y coordinate 
Returns

int32_t - the resultant x coordinate

MPLAB® Harmony Graphics Suite