East_Distance

Posted by Philip Leitch Monday, March 8, 2010 10:18:10 PM Categories: Geometry Scalar Function
CREATE Function [dbo].[East_Distance] (@Bearing as float)
/*
www.prlsoftware.com
Author: Philip Leitch
Date: 2010
Purpose: This function measures the angular distance from due East 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.
Notes:
*/
returns Float as
begin
    return (case when (@Bearing > 270) then (450 - @Bearing) else (abs((@Bearing - 90))) end)
end
Copyright 2009 Philip Leitch

Comments

You must sign in to this site to post comments.
Already Registered?
Sign In
Not Yet Registered?