public int Compare(bool leftExists, ReadOnlySpan <byte> left, bool rightExists, ReadOnlySpan <byte> right) { float leftValue = leftExists ? ScalarSpanReader.ReadFloat(left) : this.defaultValue; float rightValue = rightExists ? ScalarSpanReader.ReadFloat(right) : this.defaultValue; return(leftValue.CompareTo(rightValue)); }
public int Compare(bool leftExists, ReadOnlySpan <byte> left, bool rightExists, ReadOnlySpan <byte> right) { if (!leftExists || !rightExists) { return(leftExists.CompareTo(rightExists)); } return(ScalarSpanReader.ReadFloat(left).CompareTo(ScalarSpanReader.ReadFloat(right))); }
public override float ReadFloat(int offset) { CheckAlignment(offset, sizeof(float)); return(ScalarSpanReader.ReadFloat(this.memory.AsSpan().Slice(offset))); }
public int Compare(ReadOnlySpan <byte> left, ReadOnlySpan <byte> right) => ScalarSpanReader.ReadFloat(left).CompareTo(ScalarSpanReader.ReadFloat(right));
public override float ReadFloat(int offset) { return(ScalarSpanReader.ReadFloat(this.memory.AsSpan().Slice(offset))); }