예제 #1
0
파일: Matrix.cs 프로젝트: Frassle/Ibasa
 public Matrix(NumberType type, int rows, int columns)
 {
     Type = type;
     Rows = rows;
     Columns = columns;
     Elements = Element.Elements(rows, columns);
 }
예제 #2
0
파일: NumberType.cs 프로젝트: Frassle/Ibasa
        public bool IsImplicitlyConvertibleTo(NumberType to)
        {
            if (this == to)
                return true;

            if (this == Byte)
                return
                    to == UShort || to == Short ||
                    to == UInt || to == Int ||
                    to == ULong || to == Long ||
                    to == Float || to == Double;

            if (this == SByte)
                return
                    to == Short || to == Int || to == Long ||
                    to == Float || to == Double;


            if (this == UShort)
                return
                    to == UInt || to == Int ||
                    to == ULong || to == Long |
                    to == Float || to == Double;

            if (this == Short)
                return
                    to == Int || to == Long ||
                    to == Float || to == Double;


            if (this == UInt)
                return
                    to == ULong || to == Long ||
                    to == Float || to == Double;

            if (this == Int)
                return
                    to == Long ||
                    to == Float || to == Double;


            if (this == ULong)
                return
                    to == Float || to == Double;

            if (this == Long)
                return
                    to == Float || to == Double;

            if (this == Half)
                return
                    to == Float || to == Double;

            if (this == Float)
                return
                    to == Double;

            return false;
        }
예제 #3
0
파일: Color.cs 프로젝트: Frassle/Ibasa
 public Color(NumberType type)
 {
     Type = type;
     Components = new Component[] {
         new Component("R", 0),
         new Component("G", 1),
         new Component("B", 2),
         new Component("A", 3)
     };
 }
예제 #4
0
파일: NumberType.cs 프로젝트: Frassle/Ibasa
        private NumberType(string name, string clrName, string suffix, int size, bool clsCompliant, bool unsigned, bool real, NumberType realType = null, NumberType negativeType = null, NumberType positiveType = null)
	    {
		    Name = name;
            CLRName = clrName;
            Suffix = suffix;
            Size = size;
		    IsCLSCompliant = clsCompliant;
		    IsUnsigned = unsigned;
		    IsReal = real;

            RealType = realType ?? this;
            NegativeType = negativeType ?? this;
		    PositiveType = positiveType ?? this;
	    }
예제 #5
0
파일: Line.cs 프로젝트: bonomali/Ibasa
 public Line(NumberType type, int dimension)
 {
     Type      = type;
     Dimension = dimension;
 }
예제 #6
0
파일: Plane.cs 프로젝트: Frassle/Ibasa
 public Plane(NumberType type)
 {
     Type = type;
 }
예제 #7
0
파일: Sphere.cs 프로젝트: bonomali/Ibasa
 public Sphere(NumberType type)
 {
     Type = type;
 }
예제 #8
0
        private NumberType(string name, string clrName, string suffix, int size, bool clsCompliant, bool unsigned, bool real, NumberType realType = null, NumberType negativeType = null, NumberType positiveType = null)
        {
            Name           = name;
            CLRName        = clrName;
            Suffix         = suffix;
            Size           = size;
            IsCLSCompliant = clsCompliant;
            IsUnsigned     = unsigned;
            IsReal         = real;

            RealType     = realType ?? this;
            NegativeType = negativeType ?? this;
            PositiveType = positiveType ?? this;
        }
예제 #9
0
        public bool IsImplicitlyConvertibleTo(NumberType to)
        {
            if (this == to)
            {
                return(true);
            }

            if (this == Byte)
            {
                return
                    (to == UShort || to == Short ||
                     to == UInt || to == Int ||
                     to == ULong || to == Long ||
                     to == Float || to == Double);
            }

            if (this == SByte)
            {
                return
                    (to == Short || to == Int || to == Long ||
                     to == Float || to == Double);
            }


            if (this == UShort)
            {
                return
                    (to == UInt || to == Int ||
                     to == ULong || to == Long |
                     to == Float || to == Double);
            }

            if (this == Short)
            {
                return
                    (to == Int || to == Long ||
                     to == Float || to == Double);
            }


            if (this == UInt)
            {
                return
                    (to == ULong || to == Long ||
                     to == Float || to == Double);
            }

            if (this == Int)
            {
                return
                    (to == Long ||
                     to == Float || to == Double);
            }


            if (this == ULong)
            {
                return
                    (to == Float || to == Double);
            }

            if (this == Long)
            {
                return
                    (to == Float || to == Double);
            }

            if (this == Half)
            {
                return
                    (to == Float || to == Double);
            }

            if (this == Float)
            {
                return
                    (to == Double);
            }

            return(false);
        }
예제 #10
0
파일: Polygon.cs 프로젝트: bonomali/Ibasa
 public Polygon(NumberType type, int dimension)
 {
     Type      = type;
     Dimension = dimension;
 }
예제 #11
0
파일: Ellipse.cs 프로젝트: Frassle/Ibasa
 public Ellipse(NumberType type)
 {
     Type = type;
 }
예제 #12
0
파일: Quaternion.cs 프로젝트: Frassle/Ibasa
 public Quaternion(NumberType type)
 {
     Type = type;
     Components = Component.Components(4, false);
 }
예제 #13
0
파일: Vector.cs 프로젝트: Frassle/Ibasa
 public Vector(NumberType type, int dimension)
 {
     Type = type;
     Dimension = dimension;
     Components = Component.Components(Dimension);
 }
예제 #14
0
파일: Box.cs 프로젝트: Frassle/Ibasa
 public Box(NumberType type)
 {
     Type = type;
 }
예제 #15
0
파일: Size.cs 프로젝트: Frassle/Ibasa
 public Size(NumberType type, int dimension)
 {
     Type = type;
     Dimension = dimension;
     Components = Shapes.SizeComponents(Dimension);
 }
예제 #16
0
 public Box(NumberType type)
 {
     Type = type;
 }
예제 #17
0
파일: Size.cs 프로젝트: bonomali/Ibasa
 public Size(NumberType type, int dimension)
 {
     Type       = type;
     Dimension  = dimension;
     Components = Shapes.SizeComponents(Dimension);
 }
예제 #18
0
파일: Rectangle.cs 프로젝트: bonomali/Ibasa
 public Rectangle(NumberType type)
 {
     Type = type;
 }
예제 #19
0
파일: Ray.cs 프로젝트: bonomali/Ibasa
 public Ray(NumberType type)
 {
     Type = type;
 }
예제 #20
0
파일: Sphere.cs 프로젝트: Frassle/Ibasa
 public Sphere(NumberType type)
 {
     Type = type;
 }
예제 #21
0
파일: Ray.cs 프로젝트: Frassle/Ibasa
 public Ray(NumberType type)
 {
     Type = type;
 }
예제 #22
0
 public Plane(NumberType type)
 {
     Type = type;
 }
예제 #23
0
파일: Polygon.cs 프로젝트: Frassle/Ibasa
 public Polygon(NumberType type, int dimension)
 {
     Type = type;
     Dimension = dimension;
 }
예제 #24
0
파일: Circle.cs 프로젝트: Frassle/Ibasa
 public Circle(NumberType type)
 {
     Type = type;
 }
예제 #25
0
파일: Circle.cs 프로젝트: bonomali/Ibasa
 public Circle(NumberType type)
 {
     Type = type;
 }
예제 #26
0
파일: Line.cs 프로젝트: Frassle/Ibasa
 public Line(NumberType type, int dimension)
 {
     Type = type;
     Dimension = dimension;
 }
예제 #27
0
 public Ellipse(NumberType type)
 {
     Type = type;
 }
예제 #28
0
파일: Rectangle.cs 프로젝트: Frassle/Ibasa
 public Rectangle(NumberType type)
 {
     Type = type;
 }