How to calculate Distance between two entities?

Hello, Anyone could explain me how o calculate Distance between an Entity and his target?

(Sorry, wrong tag, checked it is a question…)

[lua]ent1:GetPos():Distance(ent2:GetPos())[/lua] or [lua](ent1:GetPos() - ent2:GetPos()):Length()[/lua]