sine/cosine/whatever calculations
-
- Posts: 1125
- Joined: Tue Feb 02, 2016 2:35 am
sine/cosine/whatever calculations
i just want to know if sine, cosine and other kinds of trigonometric functions can be done within this quickBMS language
-
- Site Admin
- Posts: 12984
- Joined: Wed Jul 30, 2014 9:32 pm
Re: sine/cosine/whatever calculations
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.
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.
-
- Posts: 1125
- Joined: Tue Feb 02, 2016 2:35 am
Re: sine/cosine/whatever calculations
okay
what about xmath operators?
what about xmath operators?
-
- Site Admin
- Posts: 12984
- Joined: Wed Jul 30, 2014 9:32 pm
Re: sine/cosine/whatever calculations
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.
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.
-
- Posts: 1125
- Joined: Tue Feb 02, 2016 2:35 am
Re: sine/cosine/whatever calculations
well it's about time i take notes with this