Пример #1
0
 public double Afstand(Locatie locatie, Locatie doel)
 {
     double verschilE = locatie.easting - doel.easting;
     double verschilN = locatie.northing - doel.northing;
     double verschil = Math.Sqrt((verschilE * verschilE) + (verschilN * verschilN));
     verschil = Math.Round(verschil, 0);
     return verschil;
 }
Пример #2
0
 public double setAfstand(TimelineContent content)
 {
     UserProfile user = db.UserProfiles.Find(WebSecurity.CurrentUserId);
     Locatie locatie =  new Locatie();
     double afstand = locatie.Afstand(user.locatie, content.locatie);
     return afstand;
 }