mirror of
https://github.com/Smaug123/ray-tracing-fsharp
synced 2025-10-08 05:18:43 +00:00
Fix off-by-one
This commit is contained in:
@@ -29,9 +29,10 @@ module ImageOutput =
|
||||
match image with
|
||||
| Image arr ->
|
||||
for row in arr do
|
||||
for pixel in row do
|
||||
writer.Write (PixelOutput.toPpm pixel)
|
||||
for pixel in 0..row.Length - 2 do
|
||||
writer.Write (PixelOutput.toPpm row.[pixel])
|
||||
writer.Write " "
|
||||
writer.Write (PixelOutput.toPpm row.[row.Length - 1])
|
||||
writer.Write "\n"
|
||||
progressIncrement 1.0<progress>
|
||||
}
|
||||
|
Reference in New Issue
Block a user