#ifndef ARC_MATH_POINT_H_ #define ARC_MATH_POINT_H_ #include #ifdef __cplusplus extern "C" { #endif typedef struct ARC_Point { int32_t x; int32_t y; } ARC_Point; typedef struct ARC_UPoint { uint32_t x; uint32_t y; } ARC_UPoint; typedef struct ARC_FPoint { float x; float y; } ARC_FPoint; typedef struct ARC_DPoint { double x; double y; } ARC_DPoint; typedef struct ARC_Rect ARC_Rect; typedef struct ARC_FRect ARC_FRect; ARC_FPoint ARC_FPoint_Lerp(ARC_FPoint *start, ARC_FPoint *end, float t); /** * @brief centers point on given bounds * * @param point ARC_Point to be centered * @param bounds ARC_Rect area to center point on */ void ARC_Point_CenterOn(ARC_Point *point, ARC_Rect bounds); /** * @brief centers fpoint on given bounds * * @param point ARC_FPoint to be centered * @param bounds ARC_FRect area to center point on */ void ARC_FPoint_CenterOn(ARC_FPoint *point, ARC_FRect bounds); #ifdef __cplusplus } #endif #endif // ARC_MATH_POINT_H_