PageRenderTime 7ms CodeModel.GetById 1ms app.highlight 1ms RepoModel.GetById 2ms app.codeStats 0ms

/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
 1class POINT
 2	-- Description of POINTs objects.
 3
 4creation {ANY}
 5	make
 6
 7feature {ANY}
 8	x: REAL
 9			-- The `x' coordinate.
10
11	y: REAL
12			-- The `y' coordinate.
13
14	rho: REAL is
15		do
16			Result := x.sin
17		end
18
19	make (vx, vy: REAL) is
20		do
21			x := vx
22			y := vy
23		end
24
25	translate (dx, dy: REAL) is
26			-- To translate the `Current' POINT.
27		do
28			x := x + dx
29			y := y + dy
30		end
31
32end -- class POINT