Rectangle in Circle

Published by Matt in

Create a function that takes three numbers — the width and height of a rectangle, and the radius of a circle — and returns true if the rectangle can fit inside the circle, false if it can't.

Examples

rectangle_in_circle(8, 6, 5) ➞ true

rectangle_in_circle(5, 9, 5) ➞ false

rectangle_in_circle(4, 7, 4) ➞ false

Notes

N/A

Watch a quick demo on how Edabit works.