Re: Converting radians to degrees
From: ljb (.)
Date: 03/01/05
- Next message: Kim Magnusen: "Changing the default saving location for MS Office; by script?"
- Previous message: Bob Barrows [MVP]: "Re: Problem with VBS and DAO"
- In reply to: Björn Holmgren: "Re: Converting radians to degrees"
- Messages sorted by: [ date ] [ thread ]
Date: Tue, 1 Mar 2005 07:00:25 -0600
"Björn Holmgren" <bjohol@hotmail.com> wrote in message
news:wSVUd.29210$Of5.18983@nntpserver.swip.net...
> "Tarmo Tanilsoo" <tarmo.tanilsoo@mail.ee> wrote in message
> news:4224183f_2@news.estpak.ee...
> > Hello.
> >
> > How I can convert radians to degrees in VBScript? I need to get sine of
> the
> > degree, but I get sine of the radian.
> >
> > With best wishes,
> >
> > Tarmo Tanilsoo
> >
> >
>
> Const PI = 3.14159265358979
>
> Function Dgr2Rad(Degrees)
> Dgr2Rad = Degrees * (2 * PI) / 360
> End Function
>
> Function Rad2Dgr(Radians)
> Rad2Dgr = Radians * 360 / (2 * PI)
> End Function
>
>
> --
> Björn Holmgren
>
Rather than a constant for PI and not knowing if 2, 3 or 10 decimal places
are good enough, I use:
pi = 4.0 * Atn(1)
Its precision is as good as the machine that it is running on.
- Next message: Kim Magnusen: "Changing the default saving location for MS Office; by script?"
- Previous message: Bob Barrows [MVP]: "Re: Problem with VBS and DAO"
- In reply to: Björn Holmgren: "Re: Converting radians to degrees"
- Messages sorted by: [ date ] [ thread ]
Relevant Pages
|