Find the intersection of a line with a plane: Difference between revisions

→‎{{header|J}}: formatting
(→‎{{header|J}}: formatting)
Line 185:
=={{header|J}}==
'''Solution:'''
<lang j>mp=: +/ .* NB. matrix product
p=: mp&{: %~ -&{. mp {:@] NB. solve
intersectLinePlane=: {.@[ - {:@[ * p NB. substitute</lang>
'''Example Usage:'''
<lang j> Line=: 0 0 10 ,: 0 _1 _1 NB. Point, Ray
Line 193:
Line intersectLinePlane Plane
0 _5 5</lang>
 
=={{header|Java}}==
{{trans|Kotlin}}
892

edits