Learn R Programming

affiner (version 0.2.1)

intersection: The intersection of two objects.

Description

intersection() is an S3 method that returns the intersection of two objects.

Usage

intersection(x, y, ...)

# S3 method for Point1D intersection(x, y, ..., tolerance = sqrt(.Machine$double.eps))

# S3 method for Line2D intersection(x, y, ..., tolerance = sqrt(.Machine$double.eps))

# S3 method for Plane3D intersection(x, y, ..., tolerance = sqrt(.Machine$double.eps))

# S3 method for Coord1D intersection(x, y, ..., tolerance = sqrt(.Machine$double.eps))

# S3 method for Coord2D intersection(x, y, ..., tolerance = sqrt(.Machine$double.eps))

# S3 method for Coord3D intersection(x, y, ..., tolerance = sqrt(.Machine$double.eps))

Value

A list of the object intersections (or NULL if no intersection).

Arguments

x, y

The two objects to compute intersection for.

...

Passed to other methods (or ignored).

tolerance

Numerics with differences smaller than tolerance will be considered “equivalent”.

Details

affiner::intersection() has the same S3 signature as euclid::intersection() (so it shouldn't matter if one masks the other).

Examples

Run this code
line1 <- as_line2d("x-axis")
line2 <- as_line2d("y-axis")
line3 <- as_line2d(a = 0, b = 1, c = 2) # y + 2 = 0
intersection(line1, line1)
intersection(line1, line2)
intersection(line1, line3)

Run the code above in your browser using DataLab