Main.java Source code

Java tutorial

Introduction

Here is the source code for Main.java

Source

//package com.java2s;
import android.support.annotation.Nullable;

public class Main {
    public static int compareFloats(@Nullable Float one, @Nullable Float another, boolean ascending) {
        return one != null
                ? (another != null
                        ? !ascending ? (int) Math.signum(another - one) : (int) Math.signum(one - another)
                        : 1)
                : -1;
    }
}