'?' About finding distances(betw. 2 points)
Well, I know that to find the distance it''s something like:
sqrt((x2 - x2) + (y2 - y1) + (z2 - z1));
how would I put parenthesis in C++ code so that it calculates correctly. Second, what would I need this for in a game?
If thispost = 0 Then
GoBack()
Else
Read()
End If
sqrt((x2-x1)*(x2-x1) + (y2-y1)*(y2-y1) + (z2-z1)*(z2-z1))
As for the use, you''ll know when you need it.
As for the use, you''ll know when you need it.
If at any time u have probs with the parantheses, use the divide and conquer rule. solve the easier ones(the ones within the brackets) , save them in variables and then use those variables.
Caution: Use this only if u fnd it difficult assigning the parantheses to statement, else ur computer might start scolding u...
This is IndianaJones.
Caution: Use this only if u fnd it difficult assigning the parantheses to statement, else ur computer might start scolding u...
This is IndianaJones.
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement