Home > matGeom > geom2d > reverseLine.m

reverseLine

PURPOSE ^

REVERSELINE Return same line but with opposite orientation.

SYNOPSIS ^

function line = reverseLine(line)

DESCRIPTION ^

REVERSELINE Return same line but with opposite orientation.

   INVLINE = reverseLine(LINE);
   Returns the opposite line of LINE.
   LINE has the format [x0 y0 dx dy], then INVLINE will have following
   parameters: [x0 y0 -dx -dy].

   See also
   lines2d, createLine

CROSS-REFERENCE INFORMATION ^

This function calls: This function is called by:

SOURCE CODE ^

0001 function line = reverseLine(line)
0002 %REVERSELINE Return same line but with opposite orientation.
0003 %
0004 %   INVLINE = reverseLine(LINE);
0005 %   Returns the opposite line of LINE.
0006 %   LINE has the format [x0 y0 dx dy], then INVLINE will have following
0007 %   parameters: [x0 y0 -dx -dy].
0008 %
0009 %   See also
0010 %   lines2d, createLine
0011 
0012 % ------
0013 % Author: David Legland
0014 % E-mail: david.legland@inrae.fr
0015 % Created: 2004-01-20
0016 % Copyright 2004-2024 INRA - TPV URPOI - BIA IMASTE
0017 
0018 line(:, 3:4) = -line(:, 3:4);
0019 
0020

Generated on Thu 21-Nov-2024 11:30:22 by m2html © 2003-2022