Line circle intersection: Difference between revisions

Content added Content deleted
m (added a blank line)
m (→‎{{header|Raku}}: Fix code: Perl 6 --> Raku)
Line 460: Line 460:
(formerly Perl 6)
(formerly Perl 6)
Extend solution space to 3D. Reference: this [https://stackoverflow.com/questions/1073336/ SO question and answers]
Extend solution space to 3D. Reference: this [https://stackoverflow.com/questions/1073336/ SO question and answers]
<lang perl6>sub LineCircularOBJintersection(@P1, @P2, @Centre, \Radius) {
<lang perl6>#!/usr/bin/env perl6

sub LineCircularOBJintersection(@P1, @P2, @Centre, \Radius) {
my @d = @P2 »-« @P1 ; # d
my @d = @P2 »-« @P1 ; # d
my @f = @P1 »-« @Centre ; # c
my @f = @P1 »-« @Centre ; # c