Line circle intersection: Difference between revisions
m
→{{header|Raku}}: Fix code: Perl 6 --> Raku
m (added a blank line) |
SqrtNegInf (talk | contribs) m (→{{header|Raku}}: Fix code: Perl 6 --> Raku) |
||
Line 460:
(formerly Perl 6)
Extend solution space to 3D. Reference: this [https://stackoverflow.com/questions/1073336/ SO question and answers]
<lang perl6>sub LineCircularOBJintersection(@P1, @P2, @Centre, \Radius) {▼
▲sub LineCircularOBJintersection(@P1, @P2, @Centre, \Radius) {
my @d = @P2 »-« @P1 ; # d
my @f = @P1 »-« @Centre ; # c
|