Skip to content

Add function to find Direction3d perpendicular to two other Direction3ds #125

Open
@MartinSStewart

Description

@MartinSStewart

I wasn't able to find a function with the following signature Direction3d c -> Direction3d c -> Maybe (Direction3d c) that finds a direction that's perpendicular to two other directions (aka the axis of rotation of those two directions).

This could be implemented as:

Vector3d.cross (Direction3d.toVector dir0) (Direction3d.toVector dir1) |> Vector3d.direction

This function is pretty simple but I think it's worth including because anyone who forgot what cross products do, will have trouble figuring out how to implement this (me included until @w0rm reminded me). Unfortunately, I'm not sure what's a good name for this function.

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