diff options
Diffstat (limited to 'PrusaSL1Reader/Helpers.cs')
-rw-r--r-- | PrusaSL1Reader/Helpers.cs | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/PrusaSL1Reader/Helpers.cs b/PrusaSL1Reader/Helpers.cs index 416f1c5..79e1696 100644 --- a/PrusaSL1Reader/Helpers.cs +++ b/PrusaSL1Reader/Helpers.cs @@ -153,5 +153,10 @@ namespace PrusaSL1Reader throw new Exception($"Data type '{name}' not recognized, contact developer."); } } + + public static uint CoordinatesToPixelIndex(uint x, uint y, uint width) + { + return y * width + x; + } } } |