title: How to sort a list by the closest value to another variable Kotlin
body: <p>I want to sort a list of elements by comparing the distance between their variables to a fixed variable that I have.
  My variable is the current coordinates of my device. Something like that:</p>
  <pre><code>class Location(var lat: Double, var Long:Double)
  myLocation = Location(-33.07216, -36.70315)
  val locations = mutableListOf(Location(-23.23018, -48.50247),Location(8.3334, 49.04748),Location(61.82096, 50.45373))
  </code></pre>
  <p>And I have a list containing several of these Classes.
  I want to sort the list based on the Classes that are closest to my current location
  How can I do this? I'm pretty lost with Comparator, SortBy and SortWith</p>