mirror of
https://github.com/nicbarker/clay.git
synced 2025-04-19 04:38:01 +00:00
Switch zero comparison to epsilon
This commit is contained in:
parent
92ef909341
commit
8f887ee202
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
4
clay.h
4
clay.h
@ -2124,7 +2124,7 @@ void Clay__SizeContainersAlongAxis(bool xAxis) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
// Scrolling containers preferentially compress before others
|
// Scrolling containers preferentially compress before others
|
||||||
while (sizeToDistribute < -0.1f && resizableContainerBuffer.length > 0) {
|
while (sizeToDistribute < -CLAY__EPSILON && resizableContainerBuffer.length > 0) {
|
||||||
float largest = 0;
|
float largest = 0;
|
||||||
float secondLargest = 0;
|
float secondLargest = 0;
|
||||||
float widthToAdd = sizeToDistribute;
|
float widthToAdd = sizeToDistribute;
|
||||||
@ -2168,7 +2168,7 @@ void Clay__SizeContainersAlongAxis(bool xAxis) {
|
|||||||
Clay__int32_tArray_RemoveSwapback(&resizableContainerBuffer, childIndex--);
|
Clay__int32_tArray_RemoveSwapback(&resizableContainerBuffer, childIndex--);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
while (sizeToDistribute > 0.1f && resizableContainerBuffer.length > 0) {
|
while (sizeToDistribute > CLAY__EPSILON && resizableContainerBuffer.length > 0) {
|
||||||
float smallest = CLAY__MAXFLOAT;
|
float smallest = CLAY__MAXFLOAT;
|
||||||
float secondSmallest = CLAY__MAXFLOAT;
|
float secondSmallest = CLAY__MAXFLOAT;
|
||||||
float widthToAdd = sizeToDistribute;
|
float widthToAdd = sizeToDistribute;
|
||||||
|
Binary file not shown.
Loading…
Reference in New Issue
Block a user