Little Help
#1

Hello everybody, today I wanted to make something very usefull for my server, but I got problem, my idea was to get aspect ration by function GetPlayerCameraAspectRatio, but when it`s returning me aspect ration it`s returning me in float, which I setted in script, but I still don`t get, how function gets that float?

This is my ratio:
Код:
[15:17:49] Your aspect ratio: 1.333333
Reply
#2

You will see float value if you are making it like '%f'.If you want that result as an integer or you want to convert anything you want.You have to use with this code;
pawn Код:
Floatround
for more information, go check it out ===>>> https://sampwiki.blast.hk/wiki/Floatround
Reply
#3

Quote:
Originally Posted by trablon
Посмотреть сообщение
You will see float value if you are making it like '%f'.If you want that result as an integer or you want to convert anything you want.You have to use with this code;
pawn Код:
Floatround
for more information, go check it out ===>>> https://sampwiki.blast.hk/wiki/Floatround
I understand that, but my question was how that function calculate aspect ratio in float?
Reply
#4

https://en.wikipedia.org/wiki/Aspect_ratio_(image)

4:3 is 1.3333 (because 4 divided by 3 is 1.3333).
16:9 is 1.7777
etc.
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)