Diff of /inst/geom2d/angleAbsDiff.m [347d75] .. [fc6c4c] Maximize Restore

  Switch to side-by-side view

--- a/inst/geom2d/angleAbsDiff.m
+++ b/inst/geom2d/angleAbsDiff.m
@@ -22,37 +22,37 @@
 ## CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
 ## OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
 ## OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
-## -*- texinfo -*-
-## @deftypefn {Function File} {@var{dif} =} angleAbsDiff (@var{angle1}, @var{angle2})
-## Computes the absolute angular difference between two angles in radians.
-## The result is comprised between 0 and pi.
-##
-## @example
-##     A = angleAbsDiff(pi/2, pi/3)
-##     A = 
-##         0.5236   # equal to pi/6
-## @end example
-## 
-## @seealso{angles2d, angleDiff}
-## @end deftypefn
-
-function dif = angleAbsDiff(angle1, angle2)
-
-  # first, normalization
-  angle1 = normalizeAngle(angle1);
-  angle2 = normalizeAngle(angle2);
-
-  # compute difference and normalize
-  dif = normalizeAngle(angle1 - angle2);
-  dif = min(dif, 2*pi - dif);
-
-endfunction
-
-%!shared xp
-%! xp = pi/2;
-%!assert (xp, angleAbsDiff (pi/2, 0), 1e-6);
-%!assert (xp, angleAbsDiff (0, pi/2), 1e-6);
-%!assert (xp, angleAbsDiff (0, 3*pi/2), 1e-6);
-%!assert (xp, angleAbsDiff (3*pi/2, 0), 1e-6);
-
+
+## -*- texinfo -*-
+## @deftypefn {Function File} {@var{dif} =} angleAbsDiff (@var{angle1}, @var{angle2})
+## Computes the absolute angular difference between two angles in radians.
+## The result is comprised between 0 and pi.
+##
+## @example
+##     A = angleAbsDiff(pi/2, pi/3)
+##     A = 
+##         0.5236   # equal to pi/6
+## @end example
+## 
+## @seealso{angles2d, angleDiff}
+## @end deftypefn
+
+function dif = angleAbsDiff(angle1, angle2)
+
+  # first, normalization
+  angle1 = normalizeAngle(angle1);
+  angle2 = normalizeAngle(angle2);
+
+  # compute difference and normalize
+  dif = normalizeAngle(angle1 - angle2);
+  dif = min(dif, 2*pi - dif);
+
+endfunction
+
+%!shared xp
+%! xp = pi/2;
+%!assert (xp, angleAbsDiff (pi/2, 0), 1e-6);
+%!assert (xp, angleAbsDiff (0, pi/2), 1e-6);
+%!assert (xp, angleAbsDiff (0, 3*pi/2), 1e-6);
+%!assert (xp, angleAbsDiff (3*pi/2, 0), 1e-6);
+