You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Thank you for your suggestion.
I have some doubts, though, making the extension public (and moving it from the test sources into the non-test sources).
An extension to a very general type like BinaryFloatingPoint floating point may pollute this type more than it helps. vincenty is a very special library solving exactly one thing. Conversion from meters to other units (like nautical miles) or from radians to degree or gradians is comparatively simple and people may have different approaches. For example there is the Units and Measurement API which has nauticalMiles and UnitAngle.
A nice improvement would be adding an example to the README, which shows usage of these conversion APIs. Would that make sense to you?
I see:
/// extension for convenience
private extension BinaryFloatingPoint {
/// degree converted to radians
var asRad: Self {
return rad(fromDegree: self)
}
var asDegrees: Self {
return deg(fromRadian: self)
}
var inNm: Self {
return nm(fromMeters: self)
}
}
better if public.. I suggest.
public extension BinaryFloatingPoint {
The text was updated successfully, but these errors were encountered: