mirror of
https://github.com/hkalexling/Mango.git
synced 2025-08-02 02:45:29 -04:00
Comment about infinity average ratio
This commit is contained in:
parent
fe440d82d4
commit
31df058f81
@ -34,6 +34,8 @@ const readerComponent = () => {
|
||||
};
|
||||
});
|
||||
|
||||
// Note: for image types not supported by image_size.cr, the width and height will be 0, and so `avgRatio` will be `Infinity`.
|
||||
// TODO: support more image types in image_size.cr
|
||||
const avgRatio = dimensions.reduce((acc, cur) => {
|
||||
return acc + cur.height / cur.width
|
||||
}, 0) / dimensions.length;
|
||||
|
Loading…
x
Reference in New Issue
Block a user