Exemplo n.º 1
0
 public Matrix(NumberType type, int rows, int columns)
 {
     Type = type;
     Rows = rows;
     Columns = columns;
     Elements = Element.Elements(rows, columns);
 }
Exemplo n.º 2
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;
        }
Exemplo n.º 3
0
 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)
     };
 }
Exemplo n.º 4
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;
	    }
Exemplo n.º 5
0
 public Line(NumberType type, int dimension)
 {
     Type      = type;
     Dimension = dimension;
 }
Exemplo n.º 6
0
 public Plane(NumberType type)
 {
     Type = type;
 }
Exemplo n.º 7
0
 public Sphere(NumberType type)
 {
     Type = type;
 }
Exemplo n.º 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;
        }
Exemplo n.º 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);
        }
Exemplo n.º 10
0
 public Polygon(NumberType type, int dimension)
 {
     Type      = type;
     Dimension = dimension;
 }
Exemplo n.º 11
0
 public Ellipse(NumberType type)
 {
     Type = type;
 }
Exemplo n.º 12
0
 public Quaternion(NumberType type)
 {
     Type = type;
     Components = Component.Components(4, false);
 }
Exemplo n.º 13
0
 public Vector(NumberType type, int dimension)
 {
     Type = type;
     Dimension = dimension;
     Components = Component.Components(Dimension);
 }
Exemplo n.º 14
0
Arquivo: Box.cs Projeto: Frassle/Ibasa
 public Box(NumberType type)
 {
     Type = type;
 }
Exemplo n.º 15
0
 public Size(NumberType type, int dimension)
 {
     Type = type;
     Dimension = dimension;
     Components = Shapes.SizeComponents(Dimension);
 }
Exemplo n.º 16
0
 public Box(NumberType type)
 {
     Type = type;
 }
Exemplo n.º 17
0
 public Size(NumberType type, int dimension)
 {
     Type       = type;
     Dimension  = dimension;
     Components = Shapes.SizeComponents(Dimension);
 }
Exemplo n.º 18
0
 public Rectangle(NumberType type)
 {
     Type = type;
 }
Exemplo n.º 19
0
 public Ray(NumberType type)
 {
     Type = type;
 }
Exemplo n.º 20
0
 public Sphere(NumberType type)
 {
     Type = type;
 }
Exemplo n.º 21
0
Arquivo: Ray.cs Projeto: Frassle/Ibasa
 public Ray(NumberType type)
 {
     Type = type;
 }
Exemplo n.º 22
0
 public Plane(NumberType type)
 {
     Type = type;
 }
Exemplo n.º 23
0
 public Polygon(NumberType type, int dimension)
 {
     Type = type;
     Dimension = dimension;
 }
Exemplo n.º 24
0
 public Circle(NumberType type)
 {
     Type = type;
 }
Exemplo n.º 25
0
 public Circle(NumberType type)
 {
     Type = type;
 }
Exemplo n.º 26
0
 public Line(NumberType type, int dimension)
 {
     Type = type;
     Dimension = dimension;
 }
Exemplo n.º 27
0
 public Ellipse(NumberType type)
 {
     Type = type;
 }
Exemplo n.º 28
0
 public Rectangle(NumberType type)
 {
     Type = type;
 }