Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Vector3.cs - Calculate Perpendicular vector #191

Closed
wants to merge 2 commits into from
Closed
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
changed to be static
PaperPrototype authored Nov 12, 2024

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature.
commit 28bea2c6df643c223d84cecd7a48e71db701b50c
2 changes: 1 addition & 1 deletion Prowl.Runtime/Math/Vector3.cs
Original file line number Diff line number Diff line change
@@ -468,7 +468,7 @@ public static Vector3 ProjectOnPlane(Vector3 vector, Vector3 planeNormal)
return projectedVector;
}

public Vector3 Perpendicular(Vector3 vector)
public static Vector3 Perpendicular(Vector3 vector)
{
vector = vector.normalized; // line from a to b
if (Mathf.Approximately(Mathf.Abs(Vector3.Dot(vector, Vector3.up)), 1f))