예제 #1
0
        public override bool Equals(object obj)
        {
            if (this == obj)
            {
                return(true);
            }
            if (obj == null)
            {
                return(false);
            }
            if (!(obj is WeightImpl))
            {
                return(false);
            }
            WeightImpl other = (WeightImpl)obj;

            if (BitConverter.DoubleToInt64Bits(value) != BitConverter.DoubleToInt64Bits(other.value))
            {
                return(false);
            }
            return(true);
        }
예제 #2
0
 public Weight Create(double value)
 {
     return(WeightImpl.CreateWeight(value));
 }