Hello all. I have a method , that calculates distance between two xyz cords, and return me a nice long double number like 10,12345678963235. But I only need 10,12345 , that would be enought for me. How can I do this? This is the method that returns me the value:
public static double Distance(Vector3 v1, Vector3 v2)
{
return
(
Math.Sqrt
(
(v1.X - v2.X) * (v1.X - v2.X) +
(v1.Y - v2.Y) * (v1.Y - v2.Y) +
(v1.Z - v2.Z) * (v1.Z - v2.Z)
)
);
}
Thank you!