We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 52f5219 commit 093869fCopy full SHA for 093869f
src/flat.rs
@@ -426,6 +426,9 @@ impl SampleLayout {
426
/// Assumes that the image is backed by some sufficiently large buffer. Then computation can
427
/// not overflow as we could represent the maximum coordinate. Since overflow is defined either
428
/// way, this method can not be unsafe.
429
+ ///
430
+ /// Behavior is *unspecified* if the index is out of bounds or this sample layout would require
431
+ /// a buffer larger than `isize::MAX`.
432
pub fn in_bounds_index(&self, c: u8, x: u32, y: u32) -> usize {
433
let (c_stride, x_stride, y_stride) = self.strides_cwh();
434
(y as usize * y_stride) + (x as usize * x_stride) + (c as usize * c_stride)
0 commit comments