Functions
xs.inc
| Function | Type | Description |
|---|---|---|
| xs__task_setup | stock | This function has no description. |
| xs_abs | stock | Gets the absolute value of a number. |
| xs_acos | stock | This function has no description. |
| xs_anglevectors | stock | Computes forward, right and up vectors from given angles. |
| xs_asin | stock | This function has no description. |
| xs_assertfunc | stock | This function has no description. |
| xs_atan | stock | This function has no description. |
| xs_atan2 | stock | This function has no description. |
| xs_concmd_name | stock | Retrieves the name of a command identified by its ID. |
| xs_cos | stock | This function has no description. |
| xs_deg2rad | stock | Converts degrees to radians. |
| xs_explode | stock | "Explodes" a string, breaking it at the @delimeter character and putting each exploded part into the @output array. |
| xs_fabs | stock | This function has no description. |
| xs_find_freetaskid | stock | This function has no description. |
| xs_frand | stock | Retrieves a random float. |
| xs_freevisibleslots | stock | Checks whether there are at least @num free visible slots. |
| xs_fsign | stock | Gets the sign of a float value. |
| xs_get_maxmessages | stock | This function has no description. |
| xs_get_maxnum | stock | Returns the biggest possible positive number. |
| xs_get_minnum | stock | Returns the smallest possible negative number. |
| xs_gra2rad | stock | Converts gradians to radians. |
| xs_implode | stock | The opposite of xs_explode(). Takes an array of strings and puts them together in a single string, delimeted by the @delimeter character. |
| xs_irand | stock | Retrieves a random integer. |
| xs_irand_range | stock | Retrieves a random integer between the specified values. |
| xs_is_2power | stock | Checks if the number is a power of 2. |
| xs_is_msg_valid | stock | This function has no description. |
| xs_log | stock | This function has no description. |
| xs_plane_3p | stock | Constructs a plane out of 4 points in space. |
| xs_plane_copy | stock | Copies a plane. |
| xs_plane_dst2point | stock | Computes the distance between a plane and a point. |
| xs_plane_equal | stock | Checks if two planes are equal. |
| xs_plane_nearlyequal | stock | Checks if two planes are nearly equal. |
| xs_plane_rayintersect | stock | Checks whether a plane intersects with the ray starting at @rayStart and going to @rayDir direction. If it does intersect, outputs the intersection point in @out. |
| xs_plane_set | stock | Sets a plane to the specified values. |
| xs_point_onplane | stock | Checks if a point is on a specified plane. |
| xs_projpoint_onplane | stock | Projects a point on the plane. Stores the projected point in @out. |
| xs_rad2deg | stock | Converts radians to degrees. |
| xs_rad2gra | stock | Converts radians to gradians. |
| xs_replace | stock | Replaces all occurencies of @what in @text with @with. |
| xs_replace_char | stock | Replaces all occurencies of @what character in @text with @with character. |
| xs_rsqrt | stock | Calculates the reciprocal of the square root of the input value. |
| xs_seed | stock | Sets the seed for the random number generation. |
| xs_sign | stock | Gets the sign of a value. |
| xs_sin | stock | This function has no description. |
| xs_sqrt | stock | Calculates the square root of the input value. |
| xs_strchr | stock | Finds a character in a string and returns its position in the string. |
| xs_strmid | stock | Copies characters from @oldmsg to @newmsg, starting at @start and ending at @end (includes the end character). |
| xs_strtrim | stock | Remove @charstotrim number of characters from @stringtotrim, either from the beginning or the end of the string. |
| xs_tan | stock | This function has no description. |
| xs_task_begin | stock | This function has no description. |
| xs_task_end | stock | This function has no description. |
| xs_task_paramcount | stock | This function has no description. |
| xs_task_paramfl | stock | This function has no description. |
| xs_task_paramint | stock | This function has no description. |
| xs_task_paramstr | stock | This function has no description. |
| xs_task_paramtype | stock | This function has no description. |
| xs_task_pushfl | stock | This function has no description. |
| xs_task_pushint | stock | This function has no description. |
| xs_task_pushstr | stock | This function has no description. |
| xs_task_readid | stock | This function has no description. |
| xs_vec_add | stock | Adds two vectors. |
| xs_vec_add_scaled | stock | Adds the second vector scaled by a scalar to the first. |
| xs_vec_angle | stock | Computes the angle between two vectors. |
| xs_vec_copy | stock | Copies a vector into another one. |
| xs_vec_cross | stock | Computes the cross product of two vectors. |
| xs_vec_distance | stock | Computes the distance between two vectors (points). |
| xs_vec_distance_2d | stock | Computes the distance between two 2D vectors (points). |
| xs_vec_div_scalar | stock | Divide a vector by a scalar value. |
| xs_vec_dot | stock | Computes the dot product of two vectors. |
| xs_vec_equal | stock | Checks if two vectors are equal. |
| xs_vec_len | stock | Computes the length of a vector. |
| xs_vec_len_2d | stock | Computes the length of a 2D vector. |
| xs_vec_make2d | stock | Turns a 3D vector into a 2D vector. |
| xs_vec_mul_scalar | stock | Multiply a vector by a scalar value. |
| xs_vec_nearlyequal | stock | Checks if two vectors are nearly equal. |
| xs_vec_neg | stock | Negates a vector. |
| xs_vec_normalize | stock | Normalizes a vector. Normalized vector is a vector with the length of 1 unit, but with the same direction as the original vector. |
| xs_vec_reflect | stock | Reflects a vector about a normal. |
| xs_vec_set | stock | Sets vector's components to specified values. |
| xs_vec_sqdistance | stock | Computes the square of the distance between two vectors (points). This is faster than the distance. |
| xs_vec_sqdistance_2d | stock | Computes the square of the distance between two 2D vectors (points). This is faster than the distance. |
| xs_vec_sub | stock | Subtracts one vector from another one. |
| xs_vec_sub_scaled | stock | Subtracts the second vector scaled by a scalar from the first one. |