Jump to content

Ray-casting algorithm: Difference between revisions

m
→‎{{header|11l}}: named tuples
(Added Algol 68)
m (→‎{{header|11l}}: named tuples)
 
Line 79:
{{trans|Python}}
 
<syntaxhighlight lang="11l">T Pt((Float x, Float y))
Float x, y
 
F (x, y)
.x = x
.y = y
 
F String()
R ‘Pt(x=#., y=#.)’.format(.x, .y)
 
T Edge((Pt a, Pt b))
Pt a, b
 
F (a, b)
.a = a
.b = b
 
F String()
R ‘Edge(a=#., b=#.)’.format(.a, .b)
 
T Poly F= (String name, [Edge] edges)
T Poly
String name
[Edge] edges
 
F (name, edges)
.name = name
.edges = edges
 
V _eps = 0.00001
1,481

edits

Cookies help us deliver our services. By using our services, you agree to our use of cookies.