mirror of https://github.com/axmolengine/axmol.git
only using std::max for window.
This commit is contained in:
parent
d6cd2eb05f
commit
b54607bfc9
|
@ -634,8 +634,13 @@ bool Sprite::culling() const
|
|||
y -= screen_half.height;
|
||||
|
||||
// convert content size to world coordinates
|
||||
#if CC_TARGET_PLATFORM == CC_PLATFORM_WIN32
|
||||
float wchw = hcsx * std::max(fabsf(_modelViewTransform.mat[0] + _modelViewTransform.mat[4]), fabsf(_modelViewTransform.mat[0] - _modelViewTransform.mat[4]));
|
||||
float wchh = hcsy * std::max(fabsf(_modelViewTransform.mat[1] + _modelViewTransform.mat[5]), fabsf(_modelViewTransform.mat[1] - _modelViewTransform.mat[5]));
|
||||
#else
|
||||
float wchw = hcsx * fmaxf(fabsf(_modelViewTransform.mat[0] + _modelViewTransform.mat[4]), fabsf(_modelViewTransform.mat[0] - _modelViewTransform.mat[4]));
|
||||
float wchh = hcsy * fmaxf(fabsf(_modelViewTransform.mat[1] + _modelViewTransform.mat[5]), fabsf(_modelViewTransform.mat[1] - _modelViewTransform.mat[5]));
|
||||
#endif
|
||||
|
||||
// compare if it in the positive quarter of the screen
|
||||
float tmpx = (fabsf(x)-wchw);
|
||||
|
|
Loading…
Reference in New Issue