Skip to content

Make Vec a new type of StaticArrays.jl vector #207

@juliohm

Description

@juliohm

Currently our Vec type is an alias to SVector and that helped us get off the ground and move fast with implementations. The only problem with SVector is that it doesn't force AbstractFloat coordinates. When the user types Vec(1,2) this will generate a vector with integer coordinates and many algorithms will break assuming that the vectors live in R^n.

We need a new definition for Vec that is simply a new type of StaticVector from StaticArrays.jl. They provide an interface and parent types to inherit most of the behavior of SVector. We just need to do that and add an inner constructor like we did for Point to force AbstractFloat coordinates.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or requesthelp wantedExtra attention is needed

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions