Or use Math.toRadians()
On Feb 1, 2009 12:49 PM, "Mark Murphy" wrote:
Phill Midwinter wrote: > Ah > > So I just multiply by pi over 180?
That should work.
--
Mark Murphy (a Commons Guy) http://commonsware.com Android Training on the
Ranch! -- Mar 16-20, 200...
--~--~-~--~~
Phill Midwinter wrote:
> Ah
>
> So I just multiply by pi over 180?
That should work.
--
Mark Murphy (a Commons Guy)
http://commonsware.com
Android Training on the Ranch! -- Mar 16-20, 2009
http://www.bignerdranch.com/schedule.shtml
--~--~-~--~~~---~--~~
Yo
Ah
So I just multiply by pi over 180?
Cheers!
2009/2/1 Mark Murphy
>
> ph...@grantmidwinter.com wrote:
> >
> > input:
> > Log.v("sintest",String.valueOf(Math.sin(90)));
> >
> > output:
> > V/sintest (16869): 0.8939966636005579
> >
> > huh? I realise I'm probably about to invite explanation
ph...@grantmidwinter.com wrote:
>
> input:
> Log.v("sintest",String.valueOf(Math.sin(90)));
>
> output:
> V/sintest (16869): 0.8939966636005579
>
> huh? I realise I'm probably about to invite explanations about
> floating points and subsequent brain explosions, but could anyone tell
> me what's
According to the doc:
http://code.google.com/android/reference/java/lang/Math.html#sin(double)
you need to provide the angle in radians, where 2*Pi corresponds to
360 degrees (i.e. Pi/2 is 90 deg).
http://en.wikipedia.org/wiki/Radian
In Java, you can use the constant Math.PI for Pi.
Christoph
V/sintest (21227): -0.8011526357338304
And that's Sin(180) ?
2009/2/1 ph...@grantmidwinter.com
>
>
> input:
> Log.v("sintest",String.valueOf(Math.sin(90)));
>
> output:
> V/sintest (16869): 0.8939966636005579
>
> huh? I realise I'm probably about to invite explanations about
> floating points a
6 matches
Mail list logo