Codechange: Rename CenterBounds to CentreBounds and move to geometry header. (#14002)
This commit is contained in:
@@ -16,6 +16,17 @@
|
||||
# define Point OTTD_Point
|
||||
#endif /* __APPLE__ */
|
||||
|
||||
/**
|
||||
* Determine where to position a centred object.
|
||||
* @param min The top or left coordinate.
|
||||
* @param max The bottom or right coordinate.
|
||||
* @param size The height or width of the object to draw.
|
||||
* @return Offset of where to position the object.
|
||||
*/
|
||||
inline int CentreBounds(int min, int max, int size)
|
||||
{
|
||||
return (min + max - size + 1) / 2;
|
||||
}
|
||||
|
||||
/** Coordinates of a point in 2D */
|
||||
struct Point {
|
||||
|
||||
Reference in New Issue
Block a user