directionProportionWeight method
统计左上,右上,右下,左下 4个方向的权重占比
Implementation
Map<Direction, int> directionProportionWeight() {
final list = <Direction, int>{};
longestStretchWithRotateX()?.go(
(it) {
it.forEach((element) {
list[element] ??= 0;
list[element] = list[element]! + 1;
});
},
);
longestStretchWithRotateY()?.go((it) {
it.forEach((element) {
list[element] ??= 0;
list[element] = list[element]! + 1;
});
});
return list;
}