Skip to content

Vec3d. Rename Cross to CrossCopy or implement CrossMut #63

@OfficialLambdax

Description

@OfficialLambdax

https://github.com/anegostudios/vsapi/blob/master/Math/Vector/Vec3d.cs#L91

Id like to suggest that the Cross method is renamed to CrossCopy as it writes the result into a new object instead of editing itself. That seems in cohesive with the rest of the vec class since all other methods self edit.

eg.
Sub() -> this, Add(x) -> this [...]
while
SubCopy() -> Vec3d, AddCopy() -> Vec3d [...]

But in the case of Cross it is Cross() -> Vec3d while it should be Cross() -> this for the sake of cohesiveness.

However given that this implementation is likely used all over the place, be it in game or in mods, i doubt this suggestion is great to go with.

As such perhaps Cross stays as is but a new method is added, like CrossMut which edits the obj its called upon. Otherwise i dont see a method for me to run cross product math without creating new waste for the gc each time i do so. There is no Cross() -> this variant to be found anywhere.

Have a nice rest of your day o/

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions