Skip to content

Commit 98aa8a3

Browse files
committed
im gonna hurt myself omg
1 parent 23bc12b commit 98aa8a3

4 files changed

Lines changed: 7 additions & 7 deletions

File tree

src/GUI/BetterInputNode.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -264,7 +264,7 @@ bool BetterInputNode::ccTouchBegan(CCTouch *pTouch, CCEvent *pEvent)
264264

265265
void BetterInputNode::ccTouchMoved(CCTouch *pTouch, CCEvent *pEvent)
266266
{
267-
if (!isNumHoldActive && numHoldEnabled && std::abs<float>(pTouch->getStartLocation().y - pTouch->getLocation().y) > numHoldInterval)
267+
if (!isNumHoldActive && numHoldEnabled && fabs(pTouch->getStartLocation().y - pTouch->getLocation().y) > numHoldInterval)
268268
{
269269
numHoldStart = utils::numFromString<float>(text).unwrapOr(numHoldDefault);
270270
isNumHoldActive = true;

src/GUI/CategorySelectMenu.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -200,7 +200,7 @@ bool CategorySelectMenu::ccTouchBegan(CCTouch* touch, CCEvent* event)
200200

201201
void CategorySelectMenu::ccTouchMoved(CCTouch* touch, CCEvent* event)
202202
{
203-
if (std::abs<float>(scroll->m_contentLayer->getPositionY() - touchInitialScrollY) > 5)
203+
if (fabs(scroll->m_contentLayer->getPositionY() - touchInitialScrollY) > 5)
204204
{
205205
if (bottomBtns->m_pSelectedItem)
206206
bottomBtns->m_pSelectedItem->unselected();

src/GUI/EditLayoutUI.cpp

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -189,12 +189,12 @@ void EditLayoutUI::fixToAnchorPoints()
189189
{
190190
if (anchor.second)
191191
{
192-
if (std::abs(point.y - anchor.first) < anchorSnapDis)
192+
if (fabs(point.y - anchor.first) < anchorSnapDis)
193193
point.y = anchor.first;
194194
}
195195
else
196196
{
197-
if (std::abs(point.x - anchor.first) < anchorSnapDis)
197+
if (fabs(point.x - anchor.first) < anchorSnapDis)
198198
point.x = anchor.first;
199199
}
200200
}
@@ -233,13 +233,13 @@ void EditLayoutUI::updateAnchorPoints()
233233
{
234234
point1 = ccp(0, anchor.first);
235235
point2 = ccp(CCDirector::get()->getWinSize().width, anchor.first);
236-
dis = std::abs(grab->getPositionY() - anchor.first);
236+
dis = fabs(grab->getPositionY() - anchor.first);
237237
}
238238
else
239239
{
240240
point1 = ccp(anchor.first, 0);
241241
point2 = ccp(anchor.first, CCDirector::get()->getWinSize().height);
242-
dis = std::abs(grab->getPositionX() - anchor.first);
242+
dis = fabs(grab->getPositionX() - anchor.first);
243243
}
244244

245245
colour.a *= 1.0f - std::clamp<float>(std::clamp<float>(dis / anchorShowDis, 0, 0.7f) / 0.7f, 0, 1);

src/UI/SwelvyBG.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@ void SwelvyBG::updateSpritePosition(float dt) {
7373
rect.size.height = 320;
7474
7575
float dX = rect.origin.x - speed * dt;
76-
if(dX >= std::abs(width)) {
76+
if(dX >= fabs(width)) {
7777
dX = 0;
7878
}
7979

0 commit comments

Comments
 (0)