[Plugin] [REL] Math Plugin
#42

Quote:
Originally Posted by BeckzyBoi
Посмотреть сообщение
Some questions:

1) Could you please make a MPDistance2D?
2) Is MPDistance faster than PointToPoint3D in the PointToPoint plugin?
3) How is MPFDistance less accurate? :S Can you please give me examples of what MPDistance and MPFDistance will return using the same coordinates?
4) Does MPGetTrailerTowingVehicle loop through all vehicles to find the towing vehicle or do you keep track of trailers using OnPlayerUpdate and OnUnoccupiedVehicleUpdate?

Thanks
2. Surely, yes.

3.
pawn Код:
printf("%0.2f", MPClamp360(361.0));
    new Float:distance[4];
    distance[3] = MPFDistance(0.0, 0.0, 0.0, 100.0, 100.0, 100.0);
    distance[0] = MPFDistance(0.0, 0.0, 0.0, 1000.0, 1000.0, 1000.0);
    distance[1] = MPFDistance(0.0, 0.0, 0.0, 2000.0, 2000.0, 3000.0);
    distance[2] = MPFDistance(0.0, 0.0, 0.0, 3000.0, 3000.0, 3000.0);
    printf("MPFDistance: 0.0 - 100.0: %f - 0.0 - 1000.0: %f - 0.0 - 2000.0: %f - 0.0 - 3000.0: %f", distance[3], distance[0], distance[1], distance[2]);
distance[3] = MPDistance(0.0, 0.0, 0.0, 100.0, 100.0, 100.0);
    distance[0] = MPDistance(0.0, 0.0, 0.0, 1000.0, 1000.0, 1000.0);
    distance[1] = MPDistance(0.0, 0.0, 0.0, 2000.0, 2000.0, 3000.0);
    distance[2] = MPDistance(0.0, 0.0, 0.0, 3000.0, 3000.0, 3000.0);
    printf("MPDistance: 0.0 - 100.0: %f - 0.0 - 1000.0: %f - 0.0 - 2000.0: %f - 0.0 - 3000.0: %f", distance[3], distance[0], distance[1], distance[2]);
Results:

pawn Код:
[10:50:22] 1.00
[15:13:13] MPFDistance: 0.0 - 100.0: 173.204788 - 0.0 - 1000.0: 1732.046386 - 0.0 - 2000.0: 4123.093261 - 0.0 - 3000.0: 5196.132324
[15:13:13] MPDistance: 0.0 - 100.0: 173.205078 - 0.0 - 1000.0: 1732.050781 - 0.0 - 2000.0: 4123.105468 - 0.0 - 3000.0: 5196.152343
Seems to me, the higher the distance, the more off it would be.

4. Look at the source code for it
Reply


Messages In This Thread
[REL] Math Plugin - by JernejL - 20.07.2011, 18:08
Re: WIP Math Plugin - by Calgon - 20.07.2011, 18:11
Re: WIP Math Plugin - by JernejL - 20.07.2011, 18:15
Re: WIP Math Plugin - by Donya - 20.07.2011, 18:15
Re: WIP Math Plugin - by Calgon - 20.07.2011, 18:17
Respuesta: WIP Math Plugin - by clavador - 20.07.2011, 18:20
Re: Respuesta: WIP Math Plugin - by JernejL - 20.07.2011, 18:21
Re: WIP Math Plugin - by Kyosaur - 20.07.2011, 19:30
Re: WIP Math Plugin - by Omega-300 - 20.07.2011, 19:45
Re: WIP Math Plugin - by Gamer_Z - 20.07.2011, 20:33
Re: WIP Math Plugin - by Jay_ - 20.07.2011, 20:40
Re: WIP Math Plugin - by gamer931215 - 20.07.2011, 22:16
Re: WIP Math Plugin - by JernejL - 20.07.2011, 22:18
Re: WIP Math Plugin - by Mauzen - 20.07.2011, 22:33
Re: WIP Math Plugin - by JernejL - 20.07.2011, 22:52
Re: WIP Math Plugin - by linuxthefish - 20.07.2011, 23:17
Re: WIP Math Plugin - by Famalamalam - 20.07.2011, 23:50
Re: WIP Math Plugin - by JernejL - 20.07.2011, 23:54
Re: WIP Math Plugin - by Whitetiger - 21.07.2011, 00:29
Re: WIP Math Plugin - by linuxthefish - 21.07.2011, 00:38
Re: WIP Math Plugin - by Famalamalam - 21.07.2011, 00:41
Re: WIP Math Plugin - by JernejL - 21.07.2011, 00:54
Re: WIP Math Plugin - by JernejL - 21.07.2011, 11:05
Re: WIP Math Plugin - by Babul - 21.07.2011, 14:01
Re: WIP Math Plugin - by samiras - 21.07.2011, 14:58
Re: WIP Math Plugin - by JernejL - 21.07.2011, 16:42
Re: WIP Math Plugin - by steki. - 21.07.2011, 17:36
Re: WIP Math Plugin - by wups - 21.07.2011, 20:35
Re: WIP Math Plugin - by Incognito - 22.07.2011, 13:20
Re: WIP Math Plugin - by samiras - 24.07.2011, 17:55
Re: [REL] Math Plugin - by dr.pepper - 14.08.2011, 18:11
Re: [REL] Math Plugin - by Blacklite - 16.08.2011, 10:21
Re: [REL] Math Plugin - by cyber_punk - 17.08.2011, 21:27
Re: [REL] Math Plugin - by linuxthefish - 17.08.2011, 21:38
Re: [REL] Math Plugin - by Kar - 17.08.2011, 22:20
Re: [REL] Math Plugin - by Bakr - 19.08.2011, 03:25
Re: [REL] Math Plugin - by JernejL - 20.08.2011, 16:05
Re: [REL] Math Plugin - by Bakr - 21.08.2011, 01:36
Re: [REL] Math Plugin - by BeckzyBoi - 28.08.2011, 03:30
Re: [REL] Math Plugin - by [IL]HeHu - 29.08.2011, 14:17
Re: [REL] Math Plugin - by AndreT - 29.08.2011, 14:32
Re: [REL] Math Plugin - by Kar - 29.08.2011, 14:51
Re: [REL] Math Plugin - by JernejL - 29.08.2011, 18:27
Re: [REL] Math Plugin - by SourceCode - 15.11.2011, 14:17
Re: [REL] Math Plugin - by Niko_boy - 15.11.2011, 15:25
Re: [REL] Math Plugin - by leong124 - 17.11.2011, 08:45
Re: [REL] Math Plugin - by BeckzyBoi - 22.12.2011, 21:56
Re: [REL] Math Plugin - by leong124 - 23.12.2011, 04:07
Re: [REL] Math Plugin - by BeckzyBoi - 23.12.2011, 22:54
Re: [REL] Math Plugin - by leong124 - 24.12.2011, 16:54
Re: [REL] Math Plugin - by TheArcher - 03.01.2012, 23:30
Re: [REL] Math Plugin - by RyDeR` - 04.01.2012, 00:35
Re: [REL] Math Plugin - by DrTHE - 04.01.2012, 00:44
Re: [REL] Math Plugin - by TheArcher - 04.01.2012, 01:05
Re: [REL] Math Plugin - by zgintasz - 09.06.2012, 12:11
Re: [REL] Math Plugin - by cyber_punk - 04.10.2012, 19:55
Re: [REL] Math Plugin - by TheArcher - 01.02.2013, 18:14
Re: [REL] Math Plugin - by TheArcher - 02.02.2013, 10:25
Re: [REL] Math Plugin - by JernejL - 25.03.2015, 12:14

Forum Jump:


Users browsing this thread: 9 Guest(s)