■ 두 벡터의 내적 구하기

------------------------------------------------------------------------------------------------------------------------

using System.Windows.Media.Media3D;

 

#region 내적 구하기 - GetDotProduct(vector1, vector2)

 

/// <summary>

/// 내적 구하기

/// </summary>

/// <param name="vector1">벡터 1</param>

/// <param name="vector2">벡터 2</param>

/// <returns>내적</returns>

public double GetDotProduct(Vector3D vector1, Vector3D vector2)

{

    return vector1.X * vector2.X + vector1.Y * vector2.Y + vector1.Z * vector2.Z;

}

 

#endregion

------------------------------------------------------------------------------------------------------------------------

Posted by 사용자 icodebroker
TAG