find_maxima: weird physics thing

Description Usage Arguments Examples

View source: R/day17.R

Description

weird physics thing

Usage

1
find_maxima(goal_x, goal_y)

Arguments

goal_x

min and max of x goal region

goal_y

min and max of y goal region

Examples

1
2
3
4
5
goal_x <- c(137, 171)
goal_y <- c(-98, -73)
d <- find_maxima(goal_x, goal_y)
max(d$ymax, na.rm = TRUE) # 4753
sum(!is.na(d$ymax)) # 1546

mbjoseph/adventofcode21 documentation built on Jan. 2, 2022, 9:55 a.m.