Chris Banes 07e01a9c06 am 4ae83371: am cc29b5d7: am 302adaa3: Merge "Improve FloatingActionButton border implementation" into lmp-mr1-ub-dev
* commit '4ae83371c7e0c71a2d2c38999f43f6115b61f6cb':
  Improve FloatingActionButton border implementation

GitOrigin-RevId=02dd0be9fb45ba427988dea8d6d8d2b82e36387b

PiperOrigin-RevId: 140548583
2016-12-09 18:16:10 -08:00

30 lines
958 B
Java

/*
* Copyright (C) 2015 The Android Open Source Project
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package android.support.design.widget;
class MathUtils {
static int constrain(int amount, int low, int high) {
return amount < low ? low : (amount > high ? high : amount);
}
static float constrain(float amount, float low, float high) {
return amount < low ? low : (amount > high ? high : amount);
}
}