[var] Add a fast path for coord == 0

This commit is contained in:
Behdad Esfahbod committed 2024-04-16 17:10:46 -06:00
1 parent 7b1b20fa00
commit fa6f123eef
1 file changed
+2
+2
View File
@@ -2471,6 +2471,8 @@ struct VarRegionAxis
int peak = peakCoord.to_int ();
if (peak == 0 || coord == peak)
return 1.f;
else if (coord == 0) // Faster
return 0.f;
int start = startCoord.to_int (), end = endCoord.to_int ();