View Single Post
  #5  
Old 16-12-2018, 08:13 PM
Eratosthenes's Avatar
Eratosthenes (Peter)
Trivial High Priest

Eratosthenes is offline
 
Join Date: Apr 2015
Location: Melbourne, Australia
Posts: 392
Quote:
Originally Posted by angelof View Post
Thanks. I worked it out with a little help
To get dec in degrees and ra in hours I did this


double dec = Math.asin(z) / Math.PI * 180;

double ra = (((Math.atan2(x, y) * 180 / Math.PI -90) * -1 / 360 * 24) + 24) % 24;

Thanks

Math.?
Reply With Quote