Bilinear interpolation: Difference between revisions
Content added Content deleted
Thundergnat (talk | contribs) (Rename Perl 6 -> Raku, alphabetize, minor clean-up) |
|||
Line 52: | Line 52: | ||
}</lang> |
}</lang> |
||
=={{header |
=={{header|C sharp|C#}}== |
||
{{trans|Java}} |
{{trans|Java}} |
||
Seems to have some artifacting in the output, but the image is at least recognizable. |
Seems to have some artifacting in the output, but the image is at least recognizable. |
||
Line 563: | Line 563: | ||
save("data/lennaenlarged.jpg", Alarge) |
save("data/lennaenlarged.jpg", Alarge) |
||
</lang> |
</lang> |
||
=={{header|Kotlin}}== |
=={{header|Kotlin}}== |
||
Line 632: | Line 631: | ||
Compare offsite images: [https://github.com/SqrtNegInf/Rosettacode-Perl5-Smoke/blob/master/ref/color_wheel.png color_wheel.png] vs. |
Compare offsite images: [https://github.com/SqrtNegInf/Rosettacode-Perl5-Smoke/blob/master/ref/color_wheel.png color_wheel.png] vs. |
||
[https://github.com/SqrtNegInf/Rosettacode-Perl5-Smoke/blob/master/ref/color_wheel_interpolated.png color_wheel_interpolated.png] |
[https://github.com/SqrtNegInf/Rosettacode-Perl5-Smoke/blob/master/ref/color_wheel_interpolated.png color_wheel_interpolated.png] |
||
⚫ | |||
⚫ | |||
⚫ | |||
⚫ | |||
⚫ | |||
⚫ | |||
⚫ | |||
⚫ | |||
⚫ | |||
⚫ | |||
⚫ | |||
⚫ | |||
⚫ | |||
⚫ | |||
⚫ | |||
⚫ | |||
⚫ | |||
⚫ | |||
⚫ | |||
⚫ | |||
⚫ | |||
⚫ | |||
⚫ | |||
⚫ | |||
⚫ | |||
=={{header|Phix}}== |
=={{header|Phix}}== |
||
Line 876: | Line 837: | ||
(flomap-bilinear-ref |
(flomap-bilinear-ref |
||
fm k (+ 1/2 (/ x 250)) (+ 1/2 (/ y 250))))))</lang> |
fm k (+ 1/2 (/ x 250)) (+ 1/2 (/ y 250))))))</lang> |
||
⚫ | |||
(formerly Perl 6) |
|||
⚫ | |||
⚫ | |||
⚫ | |||
⚫ | |||
⚫ | |||
⚫ | |||
⚫ | |||
⚫ | |||
⚫ | |||
⚫ | |||
⚫ | |||
⚫ | |||
⚫ | |||
⚫ | |||
⚫ | |||
⚫ | |||
⚫ | |||
⚫ | |||
⚫ | |||
⚫ | |||
⚫ | |||
⚫ | |||
⚫ | |||
⚫ | |||
=={{header|Scala}}== |
=={{header|Scala}}== |
||
Line 938: | Line 938: | ||
private def lerp(s: Float, e: Float, t: Float) = s + (e - s) * t |
private def lerp(s: Float, e: Float, t: Float) = s + (e - s) * t |
||
}</lang> |
}</lang> |
||
=={{header|Sidef}}== |
=={{header|Sidef}}== |
||
{{trans|C}} |
{{trans|C}} |
||
Line 1,034: | Line 1,035: | ||
</lang> |
</lang> |
||
=={{header|Visual Basic .NET}}== |
=={{header|Visual Basic .NET}}== |
||
{{trans|C#}} |
{{trans|C#}} |