public Pos DirectionUnitVector(Pos To) { return((To - this).UnitVector); }
public Pos DirectionVector(Pos To) { return(To - this); }
/// <summary> /// 2次元方向ベクトルに対して左方向に向かう法線ベクトルを取得します /// </summary> /// <param name="To"></param> /// <returns></returns> public Pos NormalVector(Pos To) { Pos Direction = DirectionVector(To); return(new Pos(-Direction.y, Direction.x, 0)); }
public Pos NormalUnitVector(Pos To) { Pos Normal = NormalVector(To); return(Normal.UnitVector); }
public static Pos CrossProduct(Pos A, Pos B) { return(new Pos(A.y * B.z - B.y * A.z, A.z * B.x - B.z * A.x, A.x * B.y - B.x * A.y)); }