10-02-2024, 07:46 PM
Hello
How to write this line so that the result is in degrees.
I# = ASIN(F# * SIN(H#))
Chris
How to write this line so that the result is in degrees.
I# = ASIN(F# * SIN(H#))
Chris
Formula
|
10-02-2024, 07:46 PM
Hello
How to write this line so that the result is in degrees. I# = ASIN(F# * SIN(H#)) Chris
I# = _R2D(ASIN(F# * SIN(H#)))
_R2D() is built in function to convert radians to degrees vise versa is _D2R()
b = b + ...
10-02-2024, 08:16 PM
I# = _R2D(ASIN(F# * SIN(H#)))
Gives error. From what version of QB64 _R2D is valid. (10-02-2024, 08:16 PM)Chris Wrote: I# = _R2D(ASIN(F# * SIN(H#))) QB64pe of course, QB64 should work with this as well. You probably need _Asin() not Asin() or to get QB64pe
b = b + ...
10-02-2024, 09:02 PM
(10-02-2024, 08:16 PM)Chris Wrote: I# = _R2D(ASIN(F# * SIN(H#))) If only there was some source of reference information which one might could use to look up information like that... Perhaps, something... like a wiki?? https://qb64phoenix.com/qb64wiki/index.php/R2D Quote:Availability I'd say the issue is the lack of underline with the _ASIN command. Honestly, I do recommend the wiki for looking up syntax and examples for stuff like this. There's a reason why we go through so much effort to document these things for the user base, you know.
10-02-2024, 09:10 PM
It doesn't work in QB64pe either. Maybe someone who uses trigonometry will chime in
It works fine!
Code: (Select All) For a = 0 To _Pi(2) Step _Pi(2 / 18) ' stepping 20 degrees
b = b + ...
You know what! I wonder about the _ASin() function, it looks funky!!!
Code: (Select All) For a = 0 To _Pi(2) Step _Pi(2 / 18) ' stepping 20 degrees
b = b + ...
10-02-2024, 09:30 PM
Are you expecting F# and H# to be in degrees as well?
Code: (Select All)
Out of the above, which is radian? Which is degree? What is the value for F#? Is it 0 to 2 * _Pi? Or is it 0 to 360? Same for H#. And what do you expect back for I#? Plug and play those commands into your formula until you get the degrees where you want them and the radians where you need them.
10-02-2024, 09:35 PM
(10-02-2024, 09:28 PM)bplus Wrote: You know what! I wonder about the _ASin() function, it looks funky!!! What's funky about it? The curve goes up, then down, then up... |
« Next Oldest | Next Newest »
|