Skip to contents

Break a unit length at two random points: what's the chance that the three segments produced can form a triangle?

Usage

triangleSim(reps = 10000, table = FALSE, seed = NULL)

Arguments

reps

number of simulations to perform

table

Does the user want a table of the results?

seed

The user may provide a seed-value for random-number generation.

Value

side effects

Author

Homer White homerhanumat@gmail.com

Examples

triangleSim(seed = 3030)
#> The proportion of triangles was 0.2547.