Skip to content

Instantly share code, notes, and snippets.

@devboy
Created November 30, 2011 10:22
Show Gist options
  • Save devboy/1408583 to your computer and use it in GitHub Desktop.
Save devboy/1408583 to your computer and use it in GitHub Desktop.
var circle: { x: Int, y: Int, radius: Int } = { x: 10, y: 10, radius: 10 };
var rect: { x: Int, y: Int, width: Int, height: Int } = { x: 20, y: 20, width: 100, height: 100 };
function move( objectWithXAndY: { x: Int, y: Int } )
{
objectWithXAndY.x += 5;
objectWithXAndY.y += 5;
}
move( circle );
move( rect );
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment