Created
November 29, 2011 22:54
-
-
Save devboy/1406991 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
var circle = { x: 10, y: 10, radius: 10 }; | |
var rect = { x: 20, y: 20, width: 100, height: 100 }; | |
function move( objectWithXAndY: { x: Int, y: Int } ) | |
{ | |
objectWithXAndY.x += 5; | |
objectWithXAndY.y += 5; | |
} | |
// both calls will work | |
move( circle ); | |
move( rect ); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment