Updated includes and spcomp to SourceMod 1.9
This commit is contained in:
Vendored
+13
-22
@@ -42,7 +42,7 @@
|
||||
* @param squared If true, the result will be squared (for optimization).
|
||||
* @return Vector length (magnitude).
|
||||
*/
|
||||
native Float:GetVectorLength(const Float:vec[3], bool:squared=false);
|
||||
native float GetVectorLength(const float vec[3], bool squared=false);
|
||||
|
||||
/**
|
||||
* Calculates the distance between two vectors.
|
||||
@@ -52,7 +52,7 @@ native Float:GetVectorLength(const Float:vec[3], bool:squared=false);
|
||||
* @param squared If true, the result will be squared (for optimization).
|
||||
* @return Vector distance.
|
||||
*/
|
||||
native Float:GetVectorDistance(const Float:vec1[3], const Float:vec2[3], bool:squared=false);
|
||||
native float GetVectorDistance(const float vec1[3], const float vec2[3], bool squared=false);
|
||||
|
||||
/**
|
||||
* Calculates the dot product of two vectors.
|
||||
@@ -61,7 +61,7 @@ native Float:GetVectorDistance(const Float:vec1[3], const Float:vec2[3], bool:sq
|
||||
* @param vec2 Second vector.
|
||||
* @return Dot product of the two vectors.
|
||||
*/
|
||||
native Float:GetVectorDotProduct(const Float:vec1[3], const Float:vec2[3]);
|
||||
native float GetVectorDotProduct(const float vec1[3], const float vec2[3]);
|
||||
|
||||
/**
|
||||
* Computes the cross product of two vectors. Any input array can be the same
|
||||
@@ -70,9 +70,8 @@ native Float:GetVectorDotProduct(const Float:vec1[3], const Float:vec2[3]);
|
||||
* @param vec1 First vector.
|
||||
* @param vec2 Second vector.
|
||||
* @param result Resultant vector.
|
||||
* @noreturn
|
||||
*/
|
||||
native GetVectorCrossProduct(const Float:vec1[3], const Float:vec2[3], Float:result[3]);
|
||||
native void GetVectorCrossProduct(const float vec1[3], const float vec2[3], float result[3]);
|
||||
|
||||
/**
|
||||
* Normalizes a vector. The input array can be the same as the output array.
|
||||
@@ -81,7 +80,7 @@ native GetVectorCrossProduct(const Float:vec1[3], const Float:vec2[3], Float:res
|
||||
* @param result Resultant vector.
|
||||
* @return Vector length.
|
||||
*/
|
||||
native Float:NormalizeVector(const Float:vec[3], Float:result[3]);
|
||||
native float NormalizeVector(const float vec[3], float result[3]);
|
||||
|
||||
/**
|
||||
* Returns vectors in the direction of an angle.
|
||||
@@ -90,18 +89,16 @@ native Float:NormalizeVector(const Float:vec[3], Float:result[3]);
|
||||
* @param fwd Forward vector buffer or NULL_VECTOR.
|
||||
* @param right Right vector buffer or NULL_VECTOR.
|
||||
* @param up Up vector buffer or NULL_VECTOR.
|
||||
* @noreturn
|
||||
*/
|
||||
native GetAngleVectors(const Float:angle[3], Float:fwd[3], Float:right[3], Float:up[3]);
|
||||
native void GetAngleVectors(const float angle[3], float fwd[3], float right[3], float up[3]);
|
||||
|
||||
/**
|
||||
* Returns angles from a vector.
|
||||
*
|
||||
* @param vec Vector.
|
||||
* @param angle Angle buffer.
|
||||
* @noreturn
|
||||
*/
|
||||
native GetVectorAngles(const Float:vec[3], Float:angle[3]);
|
||||
native void GetVectorAngles(const float vec[3], float angle[3]);
|
||||
|
||||
/**
|
||||
* Returns direction vectors from a vector.
|
||||
@@ -109,9 +106,8 @@ native GetVectorAngles(const Float:vec[3], Float:angle[3]);
|
||||
* @param vec Vector.
|
||||
* @param right Right vector buffer or NULL_VECTOR.
|
||||
* @param up Up vector buffer or NULL_VECTOR.
|
||||
* @noreturn
|
||||
*/
|
||||
native GetVectorVectors(const Float:vec[3], Float:right[3], Float:up[3]);
|
||||
native void GetVectorVectors(const float vec[3], float right[3], float up[3]);
|
||||
|
||||
/**
|
||||
* Adds two vectors. It is safe to use either input buffer as an output
|
||||
@@ -120,9 +116,8 @@ native GetVectorVectors(const Float:vec[3], Float:right[3], Float:up[3]);
|
||||
* @param vec1 First vector.
|
||||
* @param vec2 Second vector.
|
||||
* @param result Result buffer.
|
||||
* @noreturn
|
||||
*/
|
||||
stock AddVectors(const Float:vec1[3], const Float:vec2[3], Float:result[3])
|
||||
stock void AddVectors(const float vec1[3], const float vec2[3], float result[3])
|
||||
{
|
||||
result[0] = vec1[0] + vec2[0];
|
||||
result[1] = vec1[1] + vec2[1];
|
||||
@@ -136,9 +131,8 @@ stock AddVectors(const Float:vec1[3], const Float:vec2[3], Float:result[3])
|
||||
* @param vec1 First vector.
|
||||
* @param vec2 Second vector to subtract from first.
|
||||
* @param result Result buffer.
|
||||
* @noreturn
|
||||
*/
|
||||
stock SubtractVectors(const Float:vec1[3], const Float:vec2[3], Float:result[3])
|
||||
stock void SubtractVectors(const float vec1[3], const float vec2[3], float result[3])
|
||||
{
|
||||
result[0] = vec1[0] - vec2[0];
|
||||
result[1] = vec1[1] - vec2[1];
|
||||
@@ -150,9 +144,8 @@ stock SubtractVectors(const Float:vec1[3], const Float:vec2[3], Float:result[3])
|
||||
*
|
||||
* @param vec Vector.
|
||||
* @param scale Scale value.
|
||||
* @noreturn
|
||||
*/
|
||||
stock ScaleVector(Float:vec[3], Float:scale)
|
||||
stock void ScaleVector(float vec[3], float scale)
|
||||
{
|
||||
vec[0] *= scale;
|
||||
vec[1] *= scale;
|
||||
@@ -163,9 +156,8 @@ stock ScaleVector(Float:vec[3], Float:scale)
|
||||
* Negatives a vector.
|
||||
*
|
||||
* @param vec Vector.
|
||||
* @noreturn
|
||||
*/
|
||||
stock NegateVector(Float:vec[3])
|
||||
stock void NegateVector(float vec[3])
|
||||
{
|
||||
vec[0] = -vec[0];
|
||||
vec[1] = -vec[1];
|
||||
@@ -178,9 +170,8 @@ stock NegateVector(Float:vec[3])
|
||||
* @param pt1 First point (to be subtracted from the second).
|
||||
* @param pt2 Second point.
|
||||
* @param output Output vector buffer.
|
||||
* @noreturn
|
||||
*/
|
||||
stock MakeVectorFromPoints(const Float:pt1[3], const Float:pt2[3], Float:output[3])
|
||||
stock void MakeVectorFromPoints(const float pt1[3], const float pt2[3], float output[3])
|
||||
{
|
||||
output[0] = pt2[0] - pt1[0];
|
||||
output[1] = pt2[1] - pt1[1];
|
||||
|
||||
Reference in New Issue
Block a user