This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
open System | |
open System.Linq | |
open ArgumentParser | |
open ArgumentParser.Reflection | |
open ArgumentParser.Reflection.POSIX | |
type private GlobalContext() = | |
static member public Instance = new GlobalContext() | |
member public this.Test = null | |
interface IParserContext with |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
readonly Comparer<Double> doubleComparer = Comparer<Double>.Create((x, y) => | |
{ | |
long firstValue = BitConverter.DoubleToInt64Bits(x); | |
long secondValue = BitConverter.DoubleToInt64Bits(y); | |
// Compare the bit-sign | |
if (firstValue >> 63 != secondValue >> 63) | |
return firstValue == secondValue ? 0 : firstValue.CompareTo(secondValue); | |
long difference = Math.Abs(firstValue - secondValue); |
NewerOlder