Skip to content

Instantly share code, notes, and snippets.

@apanda
Created July 1, 2011 04:52
Show Gist options
  • Save apanda/1057886 to your computer and use it in GitHub Desktop.
Save apanda/1057886 to your computer and use it in GitHub Desktop.
double[] src = new double[] {1.0,2.0,3.0,4.0};
double[] val = new double[]{0.0,1.0,2.0,3.0};
double[] dest = src.Select(BitConverter.DoubleToInt64Bits).
Zip(val.Select(BitConverter.DoubleToInt64Bits),
(a, b) => BitConverter.Int64BitsToDouble(a & b)).ToArray();
class Foo
{
public static T Max<T>(T a, T b)
{
return b;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment