Created
July 1, 2011 04:52
-
-
Save apanda/1057886 to your computer and use it in GitHub Desktop.
This file contains 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
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(); |
This file contains 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
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