Exemple #1
0
        public int Compare(bool leftExists, ReadOnlySpan <byte> left, bool rightExists, ReadOnlySpan <byte> right)
        {
            double leftValue  = leftExists ? ScalarSpanReader.ReadDouble(left) : this.defaultValue;
            double rightValue = rightExists ? ScalarSpanReader.ReadDouble(right) : this.defaultValue;

            return(leftValue.CompareTo(rightValue));
        }
Exemple #2
0
        public int Compare(bool leftExists, ReadOnlySpan <byte> left, bool rightExists, ReadOnlySpan <byte> right)
        {
            if (!leftExists || !rightExists)
            {
                return(leftExists.CompareTo(rightExists));
            }

            return(ScalarSpanReader.ReadDouble(left).CompareTo(ScalarSpanReader.ReadDouble(right)));
        }
Exemple #3
0
 public override double ReadDouble(int offset)
 {
     CheckAlignment(offset, sizeof(double));
     return(ScalarSpanReader.ReadDouble(this.memory.AsSpan().Slice(offset)));
 }
Exemple #4
0
 public int Compare(ReadOnlySpan <byte> left, ReadOnlySpan <byte> right)
 => ScalarSpanReader.ReadDouble(left).CompareTo(ScalarSpanReader.ReadDouble(right));
Exemple #5
0
 public override double ReadDouble(int offset)
 {
     return(ScalarSpanReader.ReadDouble(this.memory.AsSpan().Slice(offset)));
 }