get_cross_point: Get cross point between two segments

View source: R/geometry.R

get_cross_pointR Documentation

Get cross point between two segments

Description

Check if two segments has thier cross point or not.

Usage

get_cross_point(
  seg1.a_x,
  seg1.a_y,
  seg1.b_x,
  seg1.b_y,
  seg2.a_x,
  seg2.a_y,
  seg2.b_x,
  seg2.b_y
)

Arguments

seg1.a_x

x value of point A on segment 1

seg1.a_y

y value of point A on segment 1

seg1.b_x

x value of point B on segment 1

seg1.b_y

y value of point B on segment 1

seg2.a_x

x value of point A on segment 2

seg2.a_y

y value of point A on segment 2

seg2.b_x

x value of point B on segment 2

seg2.b_y

y value of point B on segment 2

Value

vector whose first and second elements are x and y.

Note

This function return incorrect values when given segments has no cross point.


hmito/hmRLib documentation built on March 13, 2024, 9:41 p.m.