sine/cosine/whatever calculations

Doubts, help and support about QuickBMS and other game research tools
AnonBaiter
Posts: 1125
Joined: Tue Feb 02, 2016 2:35 am

sine/cosine/whatever calculations

Post by AnonBaiter »

i just want to know if sine, cosine and other kinds of trigonometric functions can be done within this quickBMS language
aluigi
Site Admin
Posts: 12984
Joined: Wed Jul 30, 2014 9:32 pm

Re: sine/cosine/whatever calculations

Post by aluigi »

The answer is yes and no.
The math operators are there but keep in mind that quickbms doesn't support float numbers, just integers, so I don't know if the result is exactly what you expect.
Anyway:
math VAR1 sin VAR2
math VAR1 cos VAR2
math VAR1 log VAR2
math VAR1 pow VAR2
math VAR1 sqrt VAR2
math VAR1 ceil VAR2
...
All the C math operators are supported so you have a huge choice.
AnonBaiter
Posts: 1125
Joined: Tue Feb 02, 2016 2:35 am

Re: sine/cosine/whatever calculations

Post by AnonBaiter »

okay
what about xmath operators?
aluigi
Site Admin
Posts: 12984
Joined: Wed Jul 30, 2014 9:32 pm

Re: sine/cosine/whatever calculations

Post by aluigi »

ah I need to correct my previous post.
It's NOT sin, it's ?sin:
math VAR1 ?sin VAR2
math VAR1 ?cos VAR2
math VAR1 ?log VAR2
math VAR1 ?pow VAR2
math VAR1 ?sqrt VAR2
math VAR1 ?ceil VAR2

In theory xmath uses the same operators of math but in practice it doesn't support these "textual" operators.
AnonBaiter
Posts: 1125
Joined: Tue Feb 02, 2016 2:35 am

Re: sine/cosine/whatever calculations

Post by AnonBaiter »

well it's about time i take notes with this