X-Git-Url: https://git.ktnx.net/?p=mobile-ledger.git;a=blobdiff_plain;f=app%2Fsrc%2Fmain%2Fjava%2Fnet%2Fktnx%2Fmobileledger%2Futils%2FMisc.java;fp=app%2Fsrc%2Fmain%2Fjava%2Fnet%2Fktnx%2Fmobileledger%2Futils%2FMisc.java;h=ee6f5a746cf0f44761ee29bbf3bf3774084bc192;hp=0000000000000000000000000000000000000000;hb=865334093695e52f99d93ad9a255252b9d575053;hpb=d2657cee66086f74c7544382feced457c6577ae5 diff --git a/app/src/main/java/net/ktnx/mobileledger/utils/Misc.java b/app/src/main/java/net/ktnx/mobileledger/utils/Misc.java new file mode 100644 index 00000000..ee6f5a74 --- /dev/null +++ b/app/src/main/java/net/ktnx/mobileledger/utils/Misc.java @@ -0,0 +1,24 @@ +/* + * Copyright © 2019 Damyan Ivanov. + * This file is part of MoLe. + * MoLe is free software: you can distribute it and/or modify it + * under the term of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your opinion), any later version. + * + * MoLe is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License terms for details. + * + * You should have received a copy of the GNU General Public License + * along with MoLe. If not, see . + */ + +package net.ktnx.mobileledger.utils; + +public class Misc { + public static boolean isZero(float f) { + return (f < 0.005) && (f > -0.005); + } +}