Use Float.NaN for Cue#DIMEN_UNSET

Float.MIN_VALUE is very close to zero:
"A constant holding the smallest positive nonzero value of type float"
https://developer.android.com/reference/java/lang/Float.html#MIN_VALUE

Float.NaN more clearly conveys this is an invalid number,
and will also more clearly carry over if we do maths on it accidentally.

PiperOrigin-RevId: 276277784
This commit is contained in:
ibaker 2019-10-23 16:20:12 +01:00 committed by Oliver Woodman
parent 2cf98ecffe
commit bf01ff0f60

View File

@ -33,7 +33,8 @@ public class Cue {
public static final Cue EMPTY = new Cue("");
/** An unset position or width. */
public static final float DIMEN_UNSET = Float.MIN_VALUE;
// Note: We deliberately don't use Float.MIN_VALUE because it's positive & very close to zero.
public static final float DIMEN_UNSET = Float.NaN;
/**
* The type of anchor, which may be unset. One of {@link #TYPE_UNSET}, {@link #ANCHOR_TYPE_START},