Skip to contents

calculate the time it takes for a free fall based on distance traveled by a falling object and the gravity of the free fall using the equation of motion h = 1/2*gt^2. It also returns a plot compares the time it takes for the free fall on different planets.

Usage

freefall(height, g = 9.8)

Arguments

height

A numeric value that is the distance of the free fall in meters.

g

The gravity of the free fall.

Value

time A number that is the time it takes for the free fall. plot A plot compares the time of free fall on different planets.

Examples

freefall(10, g = 9.8)
#> [[1]]
#> [1] 1.428571
#> 
#> [[2]]
#> `geom_smooth()` using method = 'loess' and formula = 'y ~ x'

#> 
1.4286
#> [1] 1.4286
freefall(10, g = 274)
#> [[1]]
#> [1] 0.2701716
#> 
#> [[2]]
#> `geom_smooth()` using method = 'loess' and formula = 'y ~ x'

#> 
0.2702
#> [1] 0.2702