View Single Post
Author Message
xXDeathreusXx
Veteran Member
Join Date: Mar 2013
Location: pPlayer->GetOrigin();
Old 05-29-2018 , 20:03   [INC] Vector helpers
Reply With Quote #1

Extends functionality of SourceMod vectors so you don't have to iterate through array blocks every time you want to do a simple operation on a vector. More or less self explanatory what each of them do, but there is some documentation in there

Included:
  • VectorCopy
  • VectorLerp
  • VectorMulAdd
  • VectorMin
  • VectorMax
  • VectorRand
  • VectorRotate

Some helper functions
  • AnglesNormalize - ensures an angle is within Valves tolerance
  • AngleNormalize - same, but for a single value
  • SinCos - fills in 2 floats with the sin and cosine of the provided radian
  • AngleMatrix - Given an angle, creates a rotation matrix; to be used with VectorRotate
Attached Files
File Type: inc vector_helpers.inc (5.2 KB, 293 views)
__________________
Plugins|Profile
Requests closed

I'm a smartass by nature, get used to it

Last edited by xXDeathreusXx; 08-24-2018 at 20:09. Reason: New file
xXDeathreusXx is offline