Skip to content

Use methods with rl.Vector(2|3) receivers for raymath functions #490

@jsbeckr

Description

@jsbeckr

It would be nice to have methods for all raymath functions like rl.Vector2Subtract.

Something like this

func (v rl.Vector2) Normalize() rl.Vector2 {
    return rl.Vector2Normalize(v)
}

would make this

test := rl.Vector2Normalize(vector)

more readable and shorter

test := vector.Normalize()

What do you think about that?

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