package com.persagy.server.messagecenter.models.entities.base

class PointD {
    var x : Double = 0.0
    var y : Double = 0.0

    constructor(x: Double, y: Double) {
        this.x = x
        this.y = y
    }


    fun distance(px : Double, py : Double) : Double{
        var px1 = px
        var py1 = py
        px1 -= x
        py1 -= y
        return Math.sqrt(px1 * px1 + py1 * py1)
    }
}