Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- float floatsqroot(float value) {
- return sqrt(value);
- }
- float floatadd(float oper1, float oper2) {
- return oper1 + oper2;
- }
- float floatpower(float value, float exponent) {
- return pow(value, exponent);
- }
- float floatsub(float oper1, float oper2) {
- return oper2 - oper1;
- }
- float floatabs(float value) {
- return abs(value);
- }
- float floatmul(float oper1, float oper2) {
- return oper1 * oper2;
- }
- float floatround(float value) {
- return (value > 0.0)? (value + 0.5): (value - 0.5);
- /* return floorf(value + 0.5); */
- }
- int GetPlayerSpeed(int v) {
- float X;
- float Y;
- float Z;
- GetVehicleVelocity(v, &X, &Y, &Z);
- return floatround(floatsqroot(floatpower(X, 2.0) + floatpower(Y, 2.0) + floatpower(Z, 2.0)) * 190);
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement