round


Description:

[ Version ( deprecated = true , deprecated_since = "1.10" , since = "1.4" ) ]
public Rect round ()

Warning: round is deprecated since 1.10.

Rounds the origin and size of the given rectangle to their nearest integer values; the rounding is guaranteed to be large enough to have an area bigger or equal to the original rectangle, but might not fully contain its extents.

Note:

Use round_extents instead

Use round_extents in case you need to round to a rectangle that covers fully the original one.

This function is the equivalent of calling `floor` on the coordinates of the origin, and `ceil` on the size.

Parameters:

this

a Rect

res

return location for the rounded rectangle