Skip to content

Question: why are numerical values typed as int? #76

@vibridi

Description

@vibridi

For example the signature of Rect is:

Rect(x int, y int, w int, h int, s ...string)

This function, like all other ones, declare int as parameter type. Why? Computation of point coordinates is usually done with floats, why does the library forces to lose precision when using these convenience functions?

I know I can use Path instead and format the d attribute however I like, but it's very inconvenient.

Can someone shed light on this design decision?
Thank you.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions