diff --git a/components/Cards/src/MDCCard.m b/components/Cards/src/MDCCard.m index 5372cc55887..3e88556a5fa 100644 --- a/components/Cards/src/MDCCard.m +++ b/components/Cards/src/MDCCard.m @@ -295,7 +295,7 @@ - (void)setShapeGenerator:(id)shapeGenerator { - (void)updateInkForShape { CGRect boundingBox = CGPathGetBoundingBox(self.layer.shapeLayer.path); self.inkView.maxRippleRadius = - (CGFloat)(MDCHypot(CGRectGetHeight(boundingBox), CGRectGetWidth(boundingBox)) / 2 + 10); + (CGFloat)(hypot(CGRectGetHeight(boundingBox), CGRectGetWidth(boundingBox)) / 2 + 10); self.inkView.layer.masksToBounds = NO; } diff --git a/components/Cards/src/MDCCardCollectionCell.m b/components/Cards/src/MDCCardCollectionCell.m index bc9e51038b0..82f2b863e57 100644 --- a/components/Cards/src/MDCCardCollectionCell.m +++ b/components/Cards/src/MDCCardCollectionCell.m @@ -536,7 +536,7 @@ - (id)shapeGenerator { - (void)updateInkForShape { CGRect boundingBox = CGPathGetBoundingBox(self.layer.shapeLayer.path); self.inkView.maxRippleRadius = - (CGFloat)(MDCHypot(CGRectGetHeight(boundingBox), CGRectGetWidth(boundingBox)) / 2 + 10); + (CGFloat)(hypot(CGRectGetHeight(boundingBox), CGRectGetWidth(boundingBox)) / 2 + 10); self.inkView.layer.masksToBounds = NO; } diff --git a/components/Chips/src/MDCChipField.m b/components/Chips/src/MDCChipField.m index f78b633ad82..0bf870f2a69 100644 --- a/components/Chips/src/MDCChipField.m +++ b/components/Chips/src/MDCChipField.m @@ -18,7 +18,6 @@ #import "MDCChipFieldDelegate.h" #import "MaterialTextFields.h" -#import "MaterialMath.h" NSString *const MDCEmptyTextString = @""; NSString *const MDCChipDelimiterSpace = @" "; @@ -414,8 +413,8 @@ - (UIImage *)drawClearButton { CGRect innerBounds = CGRectMake(CGRectGetMinX(frame) + 2, CGRectGetMinY(frame) + 2, - MDCFloor((frame.size.width - 2) * (CGFloat)0.90909 + (CGFloat)0.5), - MDCFloor((frame.size.height - 2) * (CGFloat)0.90909 + (CGFloat)0.5)); + floor((frame.size.width - 2) * (CGFloat)0.90909 + (CGFloat)0.5), + floor((frame.size.height - 2) * (CGFloat)0.90909 + (CGFloat)0.5)); UIBezierPath *ic_clear_path = [UIBezierPath bezierPath]; [ic_clear_path moveToPoint:CGPointMake(CGRectGetMinX(innerBounds) + (CGFloat)0.50000 * innerBounds.size.width, diff --git a/components/Chips/src/MDCChipView.m b/components/Chips/src/MDCChipView.m index 5bc71902b9f..36f4952cd40 100644 --- a/components/Chips/src/MDCChipView.m +++ b/components/Chips/src/MDCChipView.m @@ -75,7 +75,7 @@ static CGRect CGRectVerticallyCentered(CGRect rect, CGFloat pixelScale) { CGFloat viewHeight = CGRectGetHeight(rect) + padding.top + padding.bottom; CGFloat yValue = (height - viewHeight) / 2; - yValue = MDCRound(yValue * pixelScale) / pixelScale; + yValue = round(yValue * pixelScale) / pixelScale; return CGRectOffset(rect, 0, yValue); } @@ -756,9 +756,9 @@ - (UIEdgeInsets)visibleAreaInsets { CGFloat additionalRequiredHeight = MAX(0, CGRectGetHeight(self.bounds) - visibleAreaSize.height); CGFloat additionalRequiredWidth = MAX(0, CGRectGetWidth(self.bounds) - visibleAreaSize.width); - visibleAreaInsets.top = MDCCeil(additionalRequiredHeight * 0.5f); + visibleAreaInsets.top = ceil(additionalRequiredHeight * 0.5f); visibleAreaInsets.bottom = additionalRequiredHeight - visibleAreaInsets.top; - visibleAreaInsets.left = MDCCeil(additionalRequiredWidth * 0.5f); + visibleAreaInsets.left = ceil(additionalRequiredWidth * 0.5f); visibleAreaInsets.right = additionalRequiredWidth - visibleAreaInsets.left; } @@ -1049,7 +1049,7 @@ - (void)startTouchBeganAnimationAtPoint:(CGPoint)point { CGSize size = [self sizeThatFits:CGSizeMake(CGFLOAT_MAX, CGFLOAT_MAX)]; CGFloat widthDiff = 24; // Difference between unselected and selected frame widths. CGFloat maxRadius = - (CGFloat)(MDCHypot(size.height, size.width + widthDiff) / 2 + 10 + widthDiff / 2); + (CGFloat)(hypot(size.height, size.width + widthDiff) / 2 + 10 + widthDiff / 2); if (self.enableRippleBehavior) { _rippleView.maximumRadius = maxRadius; [_rippleView beginRippleTouchDownAtPoint:point animated:YES completion:nil]; diff --git a/components/Chips/tests/unit/MDCChipViewTests.m b/components/Chips/tests/unit/MDCChipViewTests.m index 868f9998017..7993e7c68c9 100644 --- a/components/Chips/tests/unit/MDCChipViewTests.m +++ b/components/Chips/tests/unit/MDCChipViewTests.m @@ -15,7 +15,6 @@ #import #import "MDCChipView.h" -#import "MaterialMath.h" static inline UIImage *TestImage(CGSize size) { CGFloat scale = [UIScreen mainScreen].scale; @@ -273,9 +272,9 @@ - (void)testVisibleAreaInsetsIsCorrectWhenCenterVisibleAreaIsYES { CGSize visibleAreaSize = [chip sizeThatFits:CGSizeMake(CGFLOAT_MAX, CGFLOAT_MAX)]; CGFloat verticalInsets = 50 - visibleAreaSize.height; CGFloat horizontalInsets = 300 - visibleAreaSize.width; - CGFloat topInsets = MDCCeil(verticalInsets * 0.5f); + CGFloat topInsets = ceil(verticalInsets * 0.5f); CGFloat bottomInsets = verticalInsets - topInsets; - CGFloat leftInsets = MDCCeil(horizontalInsets * 0.5f); + CGFloat leftInsets = ceil(horizontalInsets * 0.5f); CGFloat rightInsets = horizontalInsets - leftInsets; UIEdgeInsets expectedVisibleAreaInsets = UIEdgeInsetsMake(topInsets, leftInsets, bottomInsets, rightInsets); diff --git a/components/CollectionCells/src/MDCCollectionViewTextCell.m b/components/CollectionCells/src/MDCCollectionViewTextCell.m index 755cf3d633c..63428d7e536 100644 --- a/components/CollectionCells/src/MDCCollectionViewTextCell.m +++ b/components/CollectionCells/src/MDCCollectionViewTextCell.m @@ -15,7 +15,6 @@ #import "MDCCollectionViewTextCell.h" #import -#import "MaterialMath.h" #import "MaterialTypography.h" #include @@ -63,14 +62,14 @@ static inline CGFloat CellDefaultDetailTextFontOpacity(void) { // account. At a scale of 1, equivalent to Ceil(). static inline CGFloat AlignValueToUpperPixel(CGFloat value) { CGFloat scale = [[UIScreen mainScreen] scale]; - return (CGFloat)MDCCeil(value * scale) / scale; + return (CGFloat)ceil(value * scale) / scale; } // Returns the closest pixel-aligned value lower than |value|, taking the scale factor into // account. At a scale of 1, equivalent to Floor(). static inline CGFloat AlignValueToLowerPixel(CGFloat value) { CGFloat scale = [[UIScreen mainScreen] scale]; - return (CGFloat)MDCFloor(value * scale) / scale; + return (CGFloat)floor(value * scale) / scale; } // Returns the rect resulting from applying AlignSizeToUpperPixel to the rect size. diff --git a/components/FeatureHighlight/src/private/MDCFeatureHighlightDismissGestureRecognizer.m b/components/FeatureHighlight/src/private/MDCFeatureHighlightDismissGestureRecognizer.m index 4c2dcfd2ee8..9ba425a08bd 100644 --- a/components/FeatureHighlight/src/private/MDCFeatureHighlightDismissGestureRecognizer.m +++ b/components/FeatureHighlight/src/private/MDCFeatureHighlightDismissGestureRecognizer.m @@ -135,17 +135,17 @@ - (CGFloat)progressForTouchPosition:(CGPoint)touchPos { // Now compute in the form at^2 + bt + c = 0 // a = (r2 - r1)^2 - (c2.x - c1.x)^2 - (c2.y - c1.y)^2 - CGFloat a = MDCPow(r2 - r1, 2) - MDCPow(c2.x - c1.x, 2) - MDCPow(c2.y - c1.y, 2); + CGFloat a = pow(r2 - r1, 2) - pow(c2.x - c1.x, 2) - pow(c2.y - c1.y, 2); // b = 2r1(r2 - r1) - 2c1.x(c2.x - c1.x) + 2(c2.x - c1.x)p.x - 2c1.y(c2.y - c1.y) + 2(c2.y - // c1.y)p.y CGFloat b = 2 * r1 * (r2 - r1) - 2 * c1.x * (c2.x - c1.x) + 2 * (c2.x - c1.x) * p.x - 2 * c1.y * (c2.y - c1.y) + 2 * (c2.y - c1.y) * p.y; // c = r1^2 - c1.x^2 + 2c1.x*p.x - p.x^2 - c1.y^2 + 2c1.y*p.y - p.y^2 - CGFloat c = MDCPow(r1, 2) - MDCPow(c1.x, 2) + 2 * c1.x * p.x - MDCPow(p.x, 2) - MDCPow(c1.y, 2) + - 2 * c1.y * p.y - MDCPow(p.y, 2); + CGFloat c = pow(r1, 2) - pow(c1.x, 2) + 2 * c1.x * p.x - pow(p.x, 2) - pow(c1.y, 2) + + 2 * c1.y * p.y - pow(p.y, 2); // Apply the quadratic equation - CGFloat t = (-b - MDCSqrt(b * b - 4 * a * c)) / (2 * a); + CGFloat t = (-b - sqrt(b * b - 4 * a * c)) / (2 * a); return MIN(1, MAX(0, t)); } diff --git a/components/FeatureHighlight/src/private/MDCFeatureHighlightView+Private.m b/components/FeatureHighlight/src/private/MDCFeatureHighlightView+Private.m index c7305d832d6..5c3f2717725 100644 --- a/components/FeatureHighlight/src/private/MDCFeatureHighlightView+Private.m +++ b/components/FeatureHighlight/src/private/MDCFeatureHighlightView+Private.m @@ -23,7 +23,7 @@ #import "MaterialTypography.h" static inline CGFloat CGPointDistanceToPoint(CGPoint a, CGPoint b) { - return MDCHypot(a.x - b.x, a.y - b.y); + return hypot(a.x - b.x, a.y - b.y); } const CGFloat kMDCFeatureHighlightMinimumInnerRadius = 44; diff --git a/components/Ink/src/MDCInkView.m b/components/Ink/src/MDCInkView.m index 91157a51929..727bee999f9 100644 --- a/components/Ink/src/MDCInkView.m +++ b/components/Ink/src/MDCInkView.m @@ -17,7 +17,6 @@ #import "private/MDCInkLayer.h" #import "private/MDCLegacyInkLayer.h" #import "MDCInkViewDelegate.h" -#import "MaterialMath.h" @interface MDCInkPendingAnimation : NSObject diff --git a/components/Ink/src/private/MDCInkLayer.m b/components/Ink/src/private/MDCInkLayer.m index 8a57ba82958..6f53b0b060c 100644 --- a/components/Ink/src/private/MDCInkLayer.m +++ b/components/Ink/src/private/MDCInkLayer.m @@ -15,7 +15,6 @@ #import "MDCInkLayer.h" #import "MDCInkLayerDelegate.h" -#import "MaterialMath.h" static const CGFloat MDCInkLayerCommonDuration = (CGFloat)0.083; static const CGFloat MDCInkLayerEndFadeOutDuration = (CGFloat)0.15; @@ -79,8 +78,8 @@ - (void)setNeedsLayout { - (void)setRadiiWithRect:(CGRect)rect { self.initialRadius = - (CGFloat)(MDCHypot(CGRectGetHeight(rect), CGRectGetWidth(rect)) / 2 * (CGFloat)0.6); - self.finalRadius = (CGFloat)(MDCHypot(CGRectGetHeight(rect), CGRectGetWidth(rect)) / 2 + 10); + (CGFloat)(hypot(CGRectGetHeight(rect), CGRectGetWidth(rect)) / 2 * (CGFloat)0.6); + self.finalRadius = (CGFloat)(hypot(CGRectGetHeight(rect), CGRectGetWidth(rect)) / 2 + 10); } - (void)startAnimationAtPoint:(CGPoint)point { diff --git a/components/Ripple/src/MDCRippleView.m b/components/Ripple/src/MDCRippleView.m index 3ad54c3d445..c815f4e9ceb 100644 --- a/components/Ripple/src/MDCRippleView.m +++ b/components/Ripple/src/MDCRippleView.m @@ -17,7 +17,6 @@ #import "MaterialAvailability.h" #import "MDCRippleViewDelegate.h" -#import "MaterialMath.h" @interface MDCRippleView () diff --git a/components/Ripple/src/private/MDCRippleLayer.m b/components/Ripple/src/private/MDCRippleLayer.m index ae524763e64..d8ef82d8e32 100644 --- a/components/Ripple/src/private/MDCRippleLayer.m +++ b/components/Ripple/src/private/MDCRippleLayer.m @@ -16,7 +16,6 @@ #import "MaterialAnimationTiming.h" #import "MDCRippleLayerDelegate.h" -#import "MaterialMath.h" static const CGFloat kExpandRippleBeyondSurface = 10; static const CGFloat kRippleStartingScale = (CGFloat)0.6; @@ -35,7 +34,7 @@ static CGFloat GetInitialRippleRadius(CGRect rect) { } static CGFloat GetFinalRippleRadius(CGRect rect) { - return (CGFloat)(MDCHypot(CGRectGetMidX(rect), CGRectGetMidY(rect)) + kExpandRippleBeyondSurface); + return (CGFloat)(hypot(CGRectGetMidX(rect), CGRectGetMidY(rect)) + kExpandRippleBeyondSurface); } @implementation MDCRippleLayer diff --git a/components/ShadowLayer/examples/ShadowCornerRadiusExample.m b/components/ShadowLayer/examples/ShadowCornerRadiusExample.m index 11b64ee0a70..10831514ac3 100644 --- a/components/ShadowLayer/examples/ShadowCornerRadiusExample.m +++ b/components/ShadowLayer/examples/ShadowCornerRadiusExample.m @@ -14,7 +14,6 @@ #import -#import "MaterialMath.h" #import "MaterialShadowLayer.h" #import "MaterialSlider.h" #import "ShadowRadiusLabel.h" @@ -75,19 +74,19 @@ - (id)initWithFrame:(CGRect)frame { } - (NSString *)slider:(MDCSlider *)slider displayedStringForValue:(CGFloat)value { - NSInteger points = (NSInteger)MDCRound(value); + NSInteger points = (NSInteger)round(value); return [NSString stringWithFormat:@"%ld pt", (long)points]; } // TODO: (#4848) [ShadowLayer] cornerRadius changes don't render - (void)sliderValueChanged:(MDCSlider *)slider { - NSInteger points = (NSInteger)MDCRound(slider.value); + NSInteger points = (NSInteger)round(slider.value); _paper.cornerRadius = (CGFloat)points; _elevationLabel.text = [NSString stringWithFormat:@"%ld pt", (long)points]; } - (NSString *)slider:(MDCSlider *)slider accessibilityLabelForValue:(CGFloat)value { - NSInteger points = (NSInteger)MDCRound(slider.value); + NSInteger points = (NSInteger)round(slider.value); return [NSString stringWithFormat:@"%ld points", (long)points]; } diff --git a/components/Shapes/src/MDCPathGenerator.m b/components/Shapes/src/MDCPathGenerator.m index 3d862dc52c1..095a2ad5daf 100644 --- a/components/Shapes/src/MDCPathGenerator.m +++ b/components/Shapes/src/MDCPathGenerator.m @@ -14,7 +14,6 @@ #import "MDCPathGenerator.h" -#import "MaterialMath.h" @interface MDCPathCommand : NSObject - (void)applyToCGPath:(CGMutablePathRef)cgPath transform:(CGAffineTransform *)transform; @@ -95,7 +94,7 @@ - (void)addArcWithCenter:(CGPoint)center [_operations addObject:op]; _endPoint = - CGPointMake(center.x + radius * MDCCos(endAngle), center.y + radius * MDCSin(endAngle)); + CGPointMake(center.x + radius * cos(endAngle), center.y + radius * sin(endAngle)); } - (void)addArcWithTangentPoint:(CGPoint)tangentPoint diff --git a/components/Shapes/src/MDCRectangleShapeGenerator.m b/components/Shapes/src/MDCRectangleShapeGenerator.m index 4f5a82d93b7..41ee45e2762 100644 --- a/components/Shapes/src/MDCRectangleShapeGenerator.m +++ b/components/Shapes/src/MDCRectangleShapeGenerator.m @@ -17,10 +17,9 @@ #import "MDCCornerTreatment.h" #import "MDCEdgeTreatment.h" #import "MDCPathGenerator.h" -#import "MaterialMath.h" static inline CGFloat CGPointDistanceToPoint(CGPoint a, CGPoint b) { - return MDCHypot(a.x - b.x, a.y - b.y); + return hypot(a.x - b.x, a.y - b.y); } // Edges in clockwise order @@ -208,8 +207,8 @@ - (CGFloat)angleOfCorner:(MDCShapeCornerPosition)cornerPosition forViewSize:(CGS CGPointMake(prevCornerCoord.x - cornerCoord.x, prevCornerCoord.y - cornerCoord.y); CGPoint nextVector = CGPointMake(nextCornerCoord.x - cornerCoord.x, nextCornerCoord.y - cornerCoord.y); - CGFloat prevAngle = MDCAtan2(prevVector.y, prevVector.x); - CGFloat nextAngle = MDCAtan2(nextVector.y, nextVector.x); + CGFloat prevAngle = atan2(prevVector.y, prevVector.x); + CGFloat nextAngle = atan2(nextVector.y, nextVector.x); CGFloat angle = prevAngle - nextAngle; if (angle < 0) angle += (CGFloat)(2 * M_PI); @@ -224,7 +223,7 @@ - (CGFloat)angleOfEdge:(MDCShapeEdgePosition)edgePosition forViewSize:(CGSize)si CGPoint edgeVector = CGPointMake(endCornerCoord.x - startCornerCoord.x, endCornerCoord.y - startCornerCoord.y); - return MDCAtan2(edgeVector.y, edgeVector.x); + return atan2(edgeVector.y, edgeVector.x); } - (CGPoint)cornerCoordsForPosition:(MDCShapeCornerPosition)cornerPosition diff --git a/components/private/ThumbTrack/src/MDCThumbTrack.m b/components/private/ThumbTrack/src/MDCThumbTrack.m index a35eab673e4..b8581cc1ef3 100644 --- a/components/private/ThumbTrack/src/MDCThumbTrack.m +++ b/components/private/ThumbTrack/src/MDCThumbTrack.m @@ -75,7 +75,7 @@ @return Absolute straight line distance. */ static inline CGFloat DistanceFromPointToPoint(CGPoint point1, CGPoint point2) { - return MDCHypot(point1.x - point2.x, point1.y - point2.y); + return hypot(point1.x - point2.x, point1.y - point2.y); } #if MDC_AVAILABLE_SDK_IOS(10_0) @@ -638,8 +638,8 @@ - (void)updateThumbTrackAnimated:(BOOL)animated completion:(void (^)(void))completion { [self updateViewsNoAnimation]; - BOOL activeSegmentShrinking = MDCFabs(self.value - self.filledTrackAnchorValue) < - MDCFabs(previousValue - self.filledTrackAnchorValue); + BOOL activeSegmentShrinking = fabs(self.value - self.filledTrackAnchorValue) < + fabs(previousValue - self.filledTrackAnchorValue); UIViewAnimationOptions baseAnimationOptions = UIViewAnimationOptionBeginFromCurrentState | UIViewAnimationOptionAllowUserInteraction; @@ -670,8 +670,8 @@ - (void)updateThumbTrackAnimated:(BOOL)animated (_value < _filledTrackAnchorValue && _filledTrackAnchorValue < previousValue); if (crossesAnchor) { CGFloat currentValue = _value; - CGFloat animationDurationToAnchor = (MDCFabs(previousValue - _filledTrackAnchorValue) / - MDCFabs(previousValue - currentValue)) * + CGFloat animationDurationToAnchor = (fabs(previousValue - _filledTrackAnchorValue) / + fabs(previousValue - currentValue)) * kAnimationDuration; void (^afterCrossingAnchorAnimation)(BOOL) = ^void(__unused BOOL finished) { UIViewAnimationOptions options = baseAnimationOptions | UIViewAnimationOptionCurveEaseOut; @@ -785,7 +785,7 @@ - (void)updateDotsViewActiveSegment { (self.filledTrackAnchorValue - self.minimumValue) / (self.maximumValue - self.minimumValue); CGFloat relativeValuePoint = (self.value - self.minimumValue) / (self.maximumValue - self.minimumValue); - CGFloat activeSegmentWidth = MDCFabs(relativeAnchorPoint - relativeValuePoint); + CGFloat activeSegmentWidth = fabs(relativeAnchorPoint - relativeValuePoint); CGFloat activeSegmentOriginX = MIN(relativeAnchorPoint, relativeValuePoint); _discreteDots.activeDotsSegment = CGRectMake(activeSegmentOriginX, 0, activeSegmentWidth, 0); } @@ -826,7 +826,7 @@ - (void)updateViewsMainIsAnimated:(__unused BOOL)animated if (CGRectGetWidth(_valueLabel.frame) > 1) { CGFloat scale = self.window.screen.scale > 0 ?: UIScreen.mainScreen.scale; _valueLabelHeight = - MAX(kValueLabelHeight, MDCCeil(_valueLabel.font.lineHeight * scale) / scale); + MAX(kValueLabelHeight, ceil(_valueLabel.font.lineHeight * scale) / scale); CGFloat valueLabelWidth = MAX((CGFloat)0.81 * _valueLabelHeight, [_valueLabel sizeThatFits:CGSizeMake(CGFLOAT_MAX, _valueLabelHeight)].height); @@ -866,7 +866,7 @@ - (void)updateViewsMainIsAnimated:(__unused BOOL)animated timingFunctionFromUIViewAnimationOptions:animationOptions]]; [CATransaction setAnimationDuration:duration]; _trackOnLayer.frame = - CGRectMake(trackOnXValue, 0, MDCFabs(currentXValue - anchorXValue), _trackHeight); + CGRectMake(trackOnXValue, 0, fabs(currentXValue - anchorXValue), _trackHeight); [CATransaction commit]; } else { // Set background colors for disabled state. @@ -1075,7 +1075,7 @@ - (CGFloat)relativeValueForValue:(CGFloat)value { if (MDCCGFloatEqual(_minimumValue, _maximumValue)) { return _minimumValue; } - CGFloat relValue = (value - _minimumValue) / MDCFabs(_minimumValue - _maximumValue); + CGFloat relValue = (value - _minimumValue) / fabs(_minimumValue - _maximumValue); // For RTL we invert the value if (self.mdf_effectiveUserInterfaceLayoutDirection == UIUserInterfaceLayoutDirectionRightToLeft) { relValue = 1 - relValue; @@ -1093,7 +1093,7 @@ - (CGFloat)closestValueToTargetValue:(CGFloat)targetValue { CGFloat scaledTargetValue = (targetValue - _minimumValue) / (_maximumValue - _minimumValue); CGFloat snappedValue = - MDCRound((_numDiscreteValues - 1) * scaledTargetValue) / (_numDiscreteValues - 1); + round((_numDiscreteValues - 1) * scaledTargetValue) / (_numDiscreteValues - 1); return (1 - snappedValue) * _minimumValue + snappedValue * _maximumValue; } diff --git a/components/private/ThumbTrack/src/MDCThumbView.m b/components/private/ThumbTrack/src/MDCThumbView.m index 796a36b6fbf..16d50da4ae9 100644 --- a/components/private/ThumbTrack/src/MDCThumbView.m +++ b/components/private/ThumbTrack/src/MDCThumbView.m @@ -17,7 +17,6 @@ #import "MaterialShadowElevations.h" #import "MaterialShapeLibrary.h" #import "MaterialShapes.h" -#import "MaterialMath.h" @interface MDCThumbView () @@ -110,9 +109,9 @@ - (void)configureShapeGeneratorWithCornerRadius:(CGFloat)cornerRadius CGFloat additionalRequiredHeight = MAX(0, CGRectGetHeight(self.bounds) - visibleAreaSize.height); CGFloat additionalRequiredWidth = MAX(0, CGRectGetWidth(self.bounds) - visibleAreaSize.width); - visibleAreaInsets.top = MDCCeil(additionalRequiredHeight * 0.5f); + visibleAreaInsets.top = ceil(additionalRequiredHeight * 0.5f); visibleAreaInsets.bottom = additionalRequiredHeight - visibleAreaInsets.top; - visibleAreaInsets.left = MDCCeil(additionalRequiredWidth * 0.5f); + visibleAreaInsets.left = ceil(additionalRequiredWidth * 0.5f); visibleAreaInsets.right = additionalRequiredWidth - visibleAreaInsets.left; self.shapeGenerator.topLeftCornerOffset =