This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import android.util.Log | |
| import android.view.View | |
| import androidx.lifecycle.DefaultLifecycleObserver | |
| import androidx.lifecycle.Lifecycle | |
| import androidx.lifecycle.LifecycleOwner | |
| import androidx.lifecycle.LifecycleRegistry | |
| import androidx.recyclerview.widget.RecyclerView | |
| import app.BuildConfig |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| (import 'java.lang.Math) | |
| ;; This implementation comes from the "Nice Numbers for Graph Labels" in | |
| ;; Graphics Gems by Andrew S. Glassner. This is Paul Heckbert's algorithm | |
| ;; though. | |
| (defn ^double nice-num [^double x round] | |
| (let [exp (Math/floor (Math/log10 x)) | |
| f (/ x (Math/pow 10. exp)) | |
| nf (if round |