コード例 #1
0
ファイル: VectorPoint.cs プロジェクト: mhaque3/soa_unity
        public VectorPoint Div(VectorPoint other)
        {
            var newX = Mathi.Div(x, other.X);
            var newY = Mathi.Div(y, other.Y);

            return(new VectorPoint(newX, newY));
        }
コード例 #2
0
ファイル: RectVertexEdge.cs プロジェクト: mhaque3/soa_unity
 private DiamondPoint GetEdgeFaceAnchor()
 {
     /*
      * 0 0 -> 0 0
      * 0 1 -> 0 0
      * 1 0 -> 0 -1
      * 1 1 -> 1 0
      */
     return(new DiamondPoint(
                Mathi.Div(X + Y, 2),
                Mathi.Div(Y - X, 2)));
 }
コード例 #3
0
 public LinePoint Div(LinePoint other)
 {
     return(Mathi.Div(n, other.n));
 }
コード例 #4
0
 public LinePoint ScaleDown(int r)
 {
     return(Mathi.Div(n, r));
 }
コード例 #5
0
ファイル: VectorPoint.cs プロジェクト: mhaque3/soa_unity
 public VectorPoint ScaleDown(int r)
 {
     return(new VectorPoint(
                Mathi.Div(x, r),
                Mathi.Div(y, r)));
 }