Convert decimal coordinates to Degrees, Minutes & Seconds by c#

后端 未结 4 709
说谎
说谎 2021-01-07 11:12

Has anyone know simple short code to convert this without use additional libraries ?

4条回答
  •  滥情空心
    2021-01-07 11:55

    I am infering from your question that you want to convert from cartesian to polar coordinates.

    If this is the case, the basic formulae you need are:

    r = √ (x2 + y2)

    θ = atan( y / x )

    Where r is the distance and θ is the angle from x = 0 (about the origin)

    Does this help?

提交回复
热议问题