Skip to content

Function 'round' causing problems #238

@anjemor

Description

@anjemor

The function is not doing what you think! It is 'banker rounding' and only good in such a context.
Unfortunately you have to use floor (x + 0.5).

The problems for me occur when using text functions like TextRect or DrawShadow. There I noticed, that text is not correct centered or shadows are one pixel off, which looks terrible for my buttons:
TextRectError
(1st row floor, 2nd row round)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions