mirror of
https://github.com/facebook/react-native.git
synced 2025-11-01 09:14:26 +00:00
Summary: Pull Request resolved: https://github.com/facebook/react-native/pull/33160 Enables Kotlin build in RNAndroid, while adjusting the package structure to help with path/package inconsistency. Moves `react/uimanager/interfaces` files into `react/uimanager` to make sure package name matches with file location and updates Buck configuration to still include it as a separate target. Changelog: [Android][Changed] - Moved `com/react/facebook/uimanager/interfaces` files into `com/react/facebook/uimanager` to enable Kotlin build Reviewed By: cortinico Differential Revision: D34381179 fbshipit-source-id: 252588d9c7f62b8019bdfcce66197628d63e63a1
21 lines
510 B
Java
21 lines
510 B
Java
/*
|
|
* Copyright (c) Meta Platforms, Inc. and 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.react.uimanager;
|
|
|
|
public class FloatUtil {
|
|
|
|
private static final float EPSILON = .00001f;
|
|
|
|
public static boolean floatsEqual(float f1, float f2) {
|
|
if (Float.isNaN(f1) || Float.isNaN(f2)) {
|
|
return Float.isNaN(f1) && Float.isNaN(f2);
|
|
}
|
|
return Math.abs(f2 - f1) < EPSILON;
|
|
}
|
|
}
|