Commit 719a704d by ibaker Committed by Oliver Woodman

Rollback of https://github.com/google/ExoPlayer/commit/665627c3843ebf7a83e62e2f01f9e663a1dad32e

*** Original commit ***

Rollback of https://github.com/google/ExoPlayer/commit/bf01ff0f60930427cb8a31e88fcad009d89132cc

*** Original commit ***

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 a...

***

PiperOrigin-RevId: 276674142
parent ea77defd
...@@ -33,7 +33,8 @@ public class Cue { ...@@ -33,7 +33,8 @@ public class Cue {
public static final Cue EMPTY = new Cue(""); public static final Cue EMPTY = new Cue("");
/** An unset position or width. */ /** 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.MAX_VALUE;
/** /**
* The type of anchor, which may be unset. One of {@link #TYPE_UNSET}, {@link #ANCHOR_TYPE_START}, * The type of anchor, which may be unset. One of {@link #TYPE_UNSET}, {@link #ANCHOR_TYPE_START},
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment