a guest Oct 15th, 2019 61 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. fun circleInside(
  2.     x1: Double, y1: Double, r1: Double,
  3.     x2: Double, y2: Double, r2: Double
  4. ): Boolean {
  5.     val d = trackLength(x1, y1, x2, y2)
  6.     return d <= r2 - r1
  7. }
  9. fun trackLength(x1: Double, y1: Double, x2: Double, y2: Double): Double =
  10.     sqrt(sqr(x1 - x2) + sqr(y1 - y2))
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand