Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added feature to use rounded values #256

Closed
wants to merge 13 commits into from
Closed
2 changes: 1 addition & 1 deletion CSSLayout/CSSLayout.c
Original file line number Diff line number Diff line change
Expand Up @@ -1706,7 +1706,7 @@ static void layoutNodeImpl(const CSSNodeRef node,

//if rounding feature is enabled, we distribute the remaining space over the children
//we need to figure out if we should start with the first or second child
int roundingDistributionChildIndex = (int)(numberOfRelevantRoundingChildren - floorf(strippedValuesDueToRounding)) % 2;
int roundingDistributionChildIndex = (numberOfRelevantRoundingChildren - (int)strippedValuesDueToRounding) % 2;

while (currentRelativeChild != NULL) {
childFlexBasis = currentRelativeChild->layout.computedFlexBasis;
Expand Down
1 change: 0 additions & 1 deletion tests/CSSLayoutPixelRoundingTest.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,6 @@
*
*/

#include <stdafx.h>
#include <CSSLayout/CSSLayout.h>
#include <gtest/gtest.h>

Expand Down