Legacy Documentation: Version 4.5.0

Script language:

  • JS
  • C#
  • Boo
Script language

Select your preferred scripting language. All code snippets will be displayed in this language.

Vector4.Distance

static function Distance(a: Vector4, b: Vector4): float;
static float Distance(Vector4 a, Vector4 b);
static def Distance(a as Vector4, b as Vector4) as float

Description

Returns the distance between a and b.

Vector4.Distance(a,b) is the same as (a-b).magnitude.