EsbDecimals - a Free Subset of ESBPCS for .NET

DecimalOps.Deg2Dms Method (Decimal, Int32, Int32, Decimal, Int32)

Converts a Decimal Degree into Degrees/Minutes/Seconds. Returned values are positive with Sign containing the Sign of the original value.

[Visual Basic]
Overloads Public Shared Sub Deg2Dms( _
   ByVal decDegrees As Decimal, _
   ByRef varDegrees As Integer, _
   ByRef varMinutes As Integer, _
   ByRef varSeconds As Decimal, _
   ByRef varSign As Integer _
)
[C#]
public static void Deg2Dms(
   decimal decDegrees,
   out int varDegrees,
   out int varMinutes,
   out decimal varSeconds,
   out int varSign
);

Parameters

decDegrees
Degrees in decimal format. Can be Negative.
varDegrees
Whole Degrees, >= 0
varMinutes
Whole Minutes, >= 0
varSeconds
Seconds, including fractional portion, >= 0
varSign
1 if > 0, 0 if = 0, -1 if < 0

Return Value

See Also

DecimalOps Class | Esb.Math Namespace | DecimalOps.Deg2Dms Overload List