Vector3D.Length Property


The .NET API Reference documentation has a new home. Visit the .NET API Browser on to see the new experience.

Gets the length of this Vector3D structure.

Namespace:   System.Windows.Media.Media3D
Assembly:  PresentationCore (in PresentationCore.dll)

public double Length { get; }

Property Value

Type: System.Double

The length of this Vector3D structure.

The length of a Vector3D is sometimes referred to as the magnitude.

The following example shows how to get the length of a Vector3D structure.

// Gets the length of a Vector3D.  
// Returns a Double.

Vector3D vector1 = new Vector3D(20, 30, 40);
Double length;

length = vector1.Length;
                  // length is approximately equal to 53.85165

.NET Framework
Available since 3.0
Return to top