Game Development Community

C++ noob question :)

by Bryce · in Torque Game Engine · 11/22/2009 (12:18 am) · 1 replies

Allo!

I've got two points. I'm trying to find the distance between the two points. It's got to be simple but I don't have any ideas. Can anyone help?

#1
11/22/2009 (1:38 am)
Just subtract the points and take the lenght:
F32 getDistance( Point3F ptA, Point3F ptB )
{
    return ( ptB - ptA ).len();
}