Convex hull: Difference between revisions
Content added Content deleted
(Add Rust implementation) |
m (Format Rust slightly, add output) |
||
Line 2,238: | Line 2,238: | ||
return Point {x:x as f32, y:y as f32}; |
return Point {x:x as f32, y:y as f32}; |
||
} |
} |
||
</lang> |
</lang> |
||
{{out}} |
|||
<pre> |
|||
Point { x: -9.0, y: -3.0 } |
|||
Point { x: -3.0, y: -9.0 } |
|||
Point { x: 19.0, y: -8.0 } |
|||
Point { x: 17.0, y: 5.0 } |
|||
Point { x: 12.0, y: 17.0 } |
|||
Point { x: 5.0, y: 19.0 } |
|||
Point { x: -3.0, y: 15.0 } |
|||
</pre> |
|||
=={{header|Scala}}== |
=={{header|Scala}}== |
||
Scala Implementation to find Convex hull of given points collection. Functional Paradigm followed |
Scala Implementation to find Convex hull of given points collection. Functional Paradigm followed |