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

Switch to side-by-side view

--- a/inst/geom2d/parallelLine.m
+++ b/inst/geom2d/parallelLine.m
@@ -22,34 +22,34 @@
 ## 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{res} = } parallelLine (@var{line}, @var{point})
-## @deftypefnx {Function File} {@var{res} = } parallelLine (@var{line}, @var{dist})
-## Create a line parallel to another one.
-##
-##   Returns the line with same direction vector than @var{line} and going through
-##   the point given by @var{point}. 
-##   @var{line} is given as [x0 y0 dx dy] and @var{point} is [xp yp].
-##
-##   Uses relative distance to specify position. The new line will be
-##   located at distance @var{dist}, counted positive in the right side of @var{line}
-##   and negative in the left side.
-##
-##   @seealso{lines2d, orthogonalLine, distancePointLine}
-## @end deftypefn
-
-function res = parallelLine(line, point)
-
-  if size(point, 1)==1
-      # use a distance. Compute position of point located at distance DIST on
-      # the line orthogonal to the first one.
-      point = pointOnLine([line(:,1) line(:,2) line(:,4) -line(:,3)], point);
-  end
-
-  # normal case: compute line through a point with given direction
-  res = zeros(1, 4);
-  res(1:2) = point;
-  res(3:4) = line(3:4);
-
-endfunction
+
+## -*- texinfo -*-
+## @deftypefn {Function File} {@var{res} = } parallelLine (@var{line}, @var{point})
+## @deftypefnx {Function File} {@var{res} = } parallelLine (@var{line}, @var{dist})
+## Create a line parallel to another one.
+##
+##   Returns the line with same direction vector than @var{line} and going through
+##   the point given by @var{point}. 
+##   @var{line} is given as [x0 y0 dx dy] and @var{point} is [xp yp].
+##
+##   Uses relative distance to specify position. The new line will be
+##   located at distance @var{dist}, counted positive in the right side of @var{line}
+##   and negative in the left side.
+##
+##   @seealso{lines2d, orthogonalLine, distancePointLine}
+## @end deftypefn
+
+function res = parallelLine(line, point)
+
+  if size(point, 1)==1
+      # use a distance. Compute position of point located at distance DIST on
+      # the line orthogonal to the first one.
+      point = pointOnLine([line(:,1) line(:,2) line(:,4) -line(:,3)], point);
+  end
+
+  # normal case: compute line through a point with given direction
+  res = zeros(1, 4);
+  res(1:2) = point;
+  res(3:4) = line(3:4);
+
+endfunction

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:





No, thanks