direction_check: Checks if there is a point at given location

Description Usage Arguments Value Examples

Description

This function checks if one of the rows in X is equal to the sum of the i-1'th edge and vec.

Usage

1
direction_check(X, i, edges, vec)

Arguments

X

A data.frame with two columns, named x and y respectively.

i

Numerical. current index.

edges

A data.frame with two columns, named x and y respectively.

vec

A vector of length 2.

Value

Logical.

Examples

1
2
3
4
5
6
7
8
9
edges <- data.frame(x = c(1, 1, 1),
                    y = c(1, 2, 3))
i <- 3
X <- data.frame(x = c(1, 1, 1),
                y = c(1, 2, 3))

vec <- c(0, 1)

direction_check(X, i, edges, vec)

EmilHvitfeldt/ggtetris documentation built on May 29, 2019, 2:48 p.m.