Home Upgrade Search Memberlist Extras Hacker Tools Award Goals Help Wiki Contact

.NET 

The sinus function on a calculator, how to do in VB?

(Oct 26, 2014 08:04 AM)sqsgkrlhdwg Wrote:  No.

Code
Dim rad As Double
      Dim deg As Double
Dim sin As Double
      deg = 15.0
      rad = Math.PI * deg / 180.0
      sin = Math.Sin(rad)

Wrong, to convert deg to rad you do this
rad = (Math.PI / 180) * deg;

Did any of you study in school?
(Oct 26, 2014 08:07 AM)Cornflower Blue இڿڰۣ-ڰۣ— Wrote:  Wrong, to convert deg to rad you do this
rad = (Math.PI / 180) deg;

Did any of you study in school?

Hahaha. This is THE SAME THING.

(Math.PI / 180)
deg
Is the same thing as :

(Math.PI deg) / 180

And no, I do not study at school anymore. I'm too genius for them ...

This thread is a f****
joke ...
(Oct 26, 2014 08:10 AM)sqsgkrlhdwg Wrote:  Hahaha. This is THE SAME THING.

(Math.PI / 180) deg
Is the same thing as :

(Math.PI
deg) / 180

This thread is a f***** joke ...

"(Math.PI / 180) * val" is how I always do it and how everybody I know does it, I didn't even read your post, just saw it wasn't the clean/my way of doing it, so I assumed it was wrong

Your way does work, sorry for not reading I guess xD


Possibly Related Threads...
Thread / Author Replies Views Last Post
[C] by FhackMar 2, 2022 03:52 AM 4 306 Mar 2, 2022 03:52 AM
Last Post: Fhack
[.NET] by CynnNov 6, 2014 06:17 AM 7 199 Nov 6, 2014 06:17 AM
Last Post: Cynn
[Python] by success = trueSep 14, 2013 07:05 PM 3 125 Sep 14, 2013 07:05 PM
Last Post: Dmaster_773