Created
December 6, 2010 03:44
-
-
Save mikeobrien/729810 to your computer and use it in GitHub Desktop.
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
[CompilationMapping(SourceConstructFlags.Module)] | |
public static class Photon | |
{ | |
public static double EnergyByFrequency(double nu, double multiplier) | |
{ | |
return (h * (nu * multiplier)); | |
} | |
[CompilationArgumentCounts(new int[] { 1, 1 })] | |
public static double EnergyByWavelength(double lambda, double multiplier) | |
{ | |
return ((h * c) / (lambda * multiplier)); | |
} | |
public static double c | |
{ | |
[CompilerGenerated, DebuggerNonUserCode] | |
get | |
{ | |
return 299792458.0; | |
} | |
} | |
public static double h | |
{ | |
[CompilerGenerated, DebuggerNonUserCode] | |
get | |
{ | |
return 6.62606896E-34; | |
} | |
} | |
// ... | |
} | |
[Serializable, CompilationMapping(SourceConstructFlags.ObjectType)] | |
public class Photon | |
{ | |
public double EnergyByFrequency(double nu, double multiplier) | |
{ | |
return (this.h * (nu * multiplier)); | |
} | |
[CompilationArgumentCounts(new int[] { 1, 1 })] | |
public double EnergyByWavelength(double lambda, double multiplier) | |
{ | |
return ((this.h * this.c) / (lambda * multiplier)); | |
} | |
public double c | |
{ | |
get | |
{ | |
return 299792458.0; | |
} | |
} | |
public double h | |
{ | |
get | |
{ | |
return 6.62606896E-34; | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment