Update include files documentation (#360)

* Update include files documentation

* Fix inconcistencies with spaces/tabs, some changes

* Update fun, nvault, vector

* Update sqlx.inc
This commit is contained in:
KliPPy
2017-12-09 00:22:43 +01:00
committed by Vincent Herbet
parent 5632420827
commit 7b3646a012
7 changed files with 1508 additions and 381 deletions

View File

@@ -16,34 +16,93 @@
#endif
#define _corevector_included
/* Used for angle_vector() */
/**
* Used for angle_vector()
*/
#define ANGLEVECTOR_FORWARD 1
#define ANGLEVECTOR_RIGHT 2
#define ANGLEVECTOR_UP 3
/* Returns distance between two vectors. */
/**
* Calculates the distance between two input vectors.
*
* @param origin1 The first vector
* @param origin2 The second vector
*
* @return The distance between two input vectors
*/
native get_distance(const origin1[3], const origin2[3]);
/* Gets distance between two origins (float). */
/**
* Calculates the distance between two input float vectors.
*
* @param origin1 The first vector
* @param origin2 The second vector
*
* @return The distance between two input vectors
*/
native Float:get_distance_f(const Float:Origin1[3], const Float:Origin2[3]);
/* Gives you a velocity in the direction a player is looking, iVelocity is the multiplier. */
/**
* Calculates velocity in the direction player is looking.
*
* @param iIndex Client index
* @param iVelocity Multiply vRetValue length by this much
* @param vRetValue Store the calculated velocity in this vector.
*
* @noreturn
* @error If client is not connected or client index is not
* within the range of 1 to MaxClients.
*/
native velocity_by_aim(iIndex, iVelocity, Float:vRetValue[3]);
/* Changes a vector into an angle vector. */
/**
* Changes a vector into an angle vector.
*
* @param fVector Input vector
* @param vReturn Output angle vector
*
* @noreturn
*/
native vector_to_angle(const Float:fVector[3], Float:vReturn[3]);
/* Changes an angle vector into a vector. */
/**
* Changes an angle vector into a vector.
*
* @param vector Input angle vector
* @param FRU One of the ANGLEVECTOR_* constants
* @param ret Output vector
*
* @noreturn
*/
native angle_vector(const Float:vector[3], FRU, Float:ret[3]);
/* Gets the length of a vector (float[3]). */
/**
* Calculates the length of a vector.
*
* @param vVector Input vector
*
* @return Length of the input vector
*/
native Float:vector_length(const Float:vVector[3]);
/* Gets the distance between 2 vectors (float[3]). */
/**
* Calculates the distance between two vectors.
*
* @param vVector The first vector
* @param vVector2 The second vector
*
* @return Distance between two input vectors
*/
native Float:vector_distance(const Float:vVector[3], const Float:vVector2[3]);
/* Changes an integer vec to a floating vec
* This is not a for loop because that's slower
/**
* Converts an integer vector to a floating point vector.
*
* @param IVec Input integer vector
* @param FVec Output float vector
*
* @noreturn
*/
stock IVecFVec(const IVec[3], Float:FVec[3])
{
@@ -54,7 +113,14 @@ stock IVecFVec(const IVec[3], Float:FVec[3])
return 1;
}
/* Changes a float vec to an integer vec */
/**
* Converts a floating point vector into an integer vector.
*
* @param FVec Input float vector
* @param IVec Output integer vector
*
* @noreturn
*/
stock FVecIVec(const Float:FVec[3], IVec[3])
{
IVec[0] = floatround(FVec[0]);