Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- module
- Vector2D
- {
- public
- decimal
- (
- 0.0
- )
- x
- ;
- public
- decimal
- (
- 0.0
- )
- y
- ;
- public
- constructor
- (
- x
- :
- readonly
- decimal
- ,
- y
- :
- readonly
- decimal
- )
- {
- [
- context
- ]
- .
- x
- =
- x
- ;
- [
- context
- ]
- .
- y
- =
- y
- ;
- }
- public
- function
- toString
- (
- )
- returns
- string
- {
- return
- "X: "
- +
- x
- .
- toString
- (
- )
- +
- ", Y: "
- +
- y
- .
- toString
- (
- )
- ;
- }
- }
- entry
- {
- Vector2D
- (
- 4.5
- ,
- 9.8
- )
- vector
- ;
- terminal
- .
- log
- (
- vector
- .
- toString
- (
- )
- )
- ;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement