Monday, March 8, 2010 10:16:31 PM
CREATE Function [dbo].[North_Distance] (@Bearing as float)
Author: Philip Leitch
Purpose: This function measures the angular distance from due North to the vector bearing.
Copyright: Philip Leitch 2010
Licensing: This code may be used or modified but if the code is included in a software package attribution to me must be made.
Liability: The developer assumes all liability when using this code.
returns Float as
return (case when (@Bearing > 180) then (360 - @Bearing) else @Bearing end)
Copyright 2009 Philip Leitch