/tutorial/triangle/version2/point.e
http://github.com/tybor/Liberty · Specman e · 32 lines · 21 code · 7 blank · 4 comment · 0 complexity · 8aad1023395e86cc042c0b448cca0f00 MD5 · raw file
- class POINT
- -- Description of POINTs objects.
- creation {ANY}
- make
- feature {ANY}
- x: REAL
- -- The `x' coordinate.
- y: REAL
- -- The `y' coordinate.
- rho: REAL is
- do
- Result := x.sin
- end
- make (vx, vy: REAL) is
- do
- x := vx
- y := vy
- end
- translate (dx, dy: REAL) is
- -- To translate the `Current' POINT.
- do
- x := x + dx
- y := y + dy
- end
- end -- class POINT