Skip to content

Added VectorAngles and VectorVectors. #304

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

Merged
merged 3 commits into from
Feb 25, 2020
Merged
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
Next Next commit
Added VectorAngles to mathlib.
  • Loading branch information
CookStar committed Feb 24, 2020
commit 77f6b15e2c697fd0fb31ff3c4c70a57aedf5b17d
6 changes: 6 additions & 0 deletions src/core/modules/mathlib/mathlib_wrap.cpp
100644 → 100755
Original file line number Diff line number Diff line change
Expand Up @@ -211,6 +211,12 @@ void export_vector(scope _mathlib)
"Returns True if the vector is within the given box coordinates."
)

.def("get_vector_angles",
GET_FUNCTION(void, VectorAngles, const Vector &, QAngle &),
"Forward direction vector -> Euler angles",
arg("angles")
)

.def("get_distance",
&Vector::DistTo,
args("other"),
Expand Down