Mathematics in SAMP
#1

Hello guys, How can ı learn Mathematics in SAMP (floatsin, floatcos, floattan, floatpower, floatsqroot, floatabs, floatlog etc.)
Reply
#2

The same as human math. If you need 3D Math Operations use 3DTryg.inc
Reply
#3

By going to a math course/class.
Reply
#4

Код:
stock GetVehicleHood(vehicleid, &Float:x, &Float:y, &Float:z)
{
    if (!GetVehicleModel(vehicleid) || vehicleid == INVALID_VEHICLE_ID)
        return (x = 0.0, y = 0.0, z = 0.0), 0;

    static
        Float:pos[7]
    ;
    GetVehicleModelInfo(GetVehicleModel(vehicleid), VEHICLE_MODEL_INFO_SIZE, pos[0], pos[1], pos[2]);
    GetVehiclePos(vehicleid, pos[3], pos[4], pos[5]);
    GetVehicleZAngle(vehicleid, pos[6]);

    x = pos[3] + (floatsqroot(pos[1] + pos[1]) * floatsin(-pos[6], degrees));
    y = pos[4] + (floatsqroot(pos[1] + pos[1]) * floatcos(-pos[6], degrees));
    z = pos[5];

    return 1;
}
x = pos[3] + (floatsqroot(pos[1] + pos[1]) * floatsin(-pos[6], degrees));
y = pos[4] + (floatsqroot(pos[1] + pos[1]) * floatcos(-pos[6], degrees));
z = pos[5];

in this code you see x pos 3 y pos 4 pos 5 why we make code like this why we make addition and substraction
Reply
#5

https://en.wikipedia.org/wiki/Trigonometry

Thats usually matter of 7th or 8th grade in school.
Reply
#6

Quote:
Originally Posted by Mauzen
Посмотреть сообщение
https://en.wikipedia.org/wiki/Trigonometry

Thats usually matter of 7th or 8th grade in school.
Yes ı know but ı talking about samp that different
Reply
#7

Quote:
Originally Posted by cngzn61
Посмотреть сообщение
Yes ı know but ı talking about samp that different
How is it different?

Math is math.
Reply
#8

Every math is the same, you do not understand her.
Reply
#9

Quote:
Originally Posted by AbyssMorgan
Посмотреть сообщение
Every math is the same, you do not understand her.
Okey teach me ?
Reply
#10

Quote:
Originally Posted by cngzn61
Посмотреть сообщение
Okey teach me ?
You won't get yourself a personal math teacher from sa-mp forums.

Seriously, what is wrong with you?

Additions on paper:

Код:
a = b + c
Additions in pawn:

Код:
a = b + c;
how is it different
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)