JSFiddle - React, Tailwind, and code Playground

by Yaroslav Samardak

JavaScript

function checkPoint(a, b, x, y, r) {
  return (a - x)**2 + (b - y)**2 <= r**2
}

console.log(checkPoint(3, 0, 2, 4, 6));
console.log(checkPoint(0, 0, 6, 8, 6));