Skip to content

XZ Coords in Vec2 #724

@suprohub

Description

@suprohub

What problem does this solve or what need does it fill?

Current vector is:

pub struct IVec2 {
    pub x: i32,
    pub y: i32,
}

Not all games are Z based. Some games are Y based, and if devs want use Vec2 in this games (for chunk system for example), they mental map will fall apart because 2 Y's meaning 2 different things.

Describe the solution you'd like

pub struct IVec2XZ {
    pub x: i32,
    pub z: i32,
}

Describe alternatives you've considered

Name can be also IVec2Z.
Maybe somehow implement macros for auto generating xz and replacing y everywhere.

Additional context
My use case its minecraft custom server.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions