public static Color4f ToColor4f(this IColor4 c) { if (c is Color4f) { return((Color4f)c); } return(new Color4f(c)); }
public static Color4b ToColor4b(this IColor4 c) { if (c is Color4b) { return((Color4b)c); } return(new Color4b(c)); }
public Color4b(IColor4 other) { ITuple4_Byte _other = other.AsTupleByte(); this.Red = _other.X; this.Green = _other.Y; this.Blue = _other.Z; this.Alpha = _other.W; }
public Color4f(IColor4 other) { ITuple4_Float _other = other.AsTupleFloat(); this.Red = _other.X; this.Green = _other.Y; this.Blue = _other.Z; this.Alpha = _other.W; }
public static ITuple4_Byte AsTupleByte(this IColor4 v) { ITuple4_Byte ret = v as ITuple4_Byte; if (ret != null) { return(ret); } return(VectorUtils.Convert <ITuple4_Byte>(v)); }
public static ITuple4_Float AsTupleFloat(this IColor4 v) { ITuple4_Float ret = v as ITuple4_Float; if (ret != null) { return(ret); } return(VectorUtils.Convert <IColor4, ITuple4_Float>(v)); }
bool IEquatable <IColor4> .Equals(IColor4 other) { ITuple4_Byte _other = other.AsTupleByte(); return(this.Equals(_other.X, _other.Y, _other.Z, _other.W)); }
bool IEpsilonEquatable <IColor4> .EpsilonEquals(IColor4 other, double epsilon) { ITuple4_Byte _other = other.AsTupleByte(); return(this.EpsilonEquals(_other.X, _other.Y, _other.Z, _other.W, (byte)epsilon)); }
bool IEpsilonEquatable <IColor4> .EpsilonEquals(IColor4 other, double epsilon) { ITuple4_Float _other = other.AsTupleFloat(); return(this.EpsilonEquals(_other.X, _other.Y, _other.Z, _other.W, (float)epsilon)); }