Skip to content

Unexpected Vector2 operator behaviour #155

@Ralayax

Description

@Ralayax

Hi,

It seems like operators on Vector2 modify the base object instead of making a copy.

raylib::Vector2 size{50,50};
raylib::Vector2 halfsize = size/2.0f;

std::cout << size.x << '\n';
std::cout << halfsize.x << '\n';

25 25

operator/ probably shoudn't modify the underlying object and be marked as const.

Merry christmas

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