Skip to content

Instantly share code, notes, and snippets.

@leppie
Created Oct 11, 2013
Embed
What would you like to do?
C# COMPILER, Y U MAKE ME SO MUCH CODE WHEN YOU SHOULD KNOW BETTER?
#if DEBUG
public static XYZ Normalize(this XYZ c, [CallerMemberName] string caller = "")
#else
public static XYZ Normalize(this XYZ c)
#endif
{
#if DEBUG // completely needless
Debug.Print("normalizing: {0} called from: {1}", c, caller);
#endif
return new XYZ
{
X = c.X / c.Y,
Y = 1,
Z = c.Z / c.Y,
};
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment