proper doc comments
This commit is contained in:
@@ -14,12 +14,12 @@ impl Buf {
|
||||
}
|
||||
}
|
||||
|
||||
// Truncate x and y and return a corresponding index into the data slice.
|
||||
/// Truncate x and y and return a corresponding index into the data slice.
|
||||
const fn index(&self, x: f32, y: f32) -> usize {
|
||||
crate::util::index(self.width, self.height, x, y)
|
||||
}
|
||||
|
||||
// Get the buffer value at a given position. The implementation effectively treats data as periodic, hence any finite position will produce a value.
|
||||
/// Get the buffer value at a given position. The implementation effectively treats data as periodic, hence any finite position will produce a value.
|
||||
pub fn get_buf(&self, x: f32, y: f32) -> f32 {
|
||||
self.buf[self.index(x, y)]
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user