Files
yoga/java/com/facebook/yoga/YogaConstants.java

25 lines
576 B
Java
Raw Normal View History

/**
* Copyright (c) Facebook, Inc. and its affiliates.
*
* This source code is licensed under the MIT license found in the LICENSE
* file in the root directory of this source tree.
*/
package com.facebook.yoga;
2014-09-18 15:15:21 -07:00
public class YogaConstants {
2014-09-18 15:15:21 -07:00
public static final float UNDEFINED = Float.NaN;
public static boolean isUndefined(float value) {
return Float.compare(value, UNDEFINED) == 0;
}
public static boolean isUndefined(YogaValue value) {
return value.unit == YogaUnit.UNDEFINED;
}
public static float getUndefined() {
return UNDEFINED;
}
2014-09-18 15:15:21 -07:00
}