fix stackoverflow
This commit is contained in:
Родитель
4a1a372369
Коммит
643e982313
|
@ -56,10 +56,10 @@ namespace Unity.UIWidgets.painting {
|
|||
return b * t;
|
||||
if (b == null)
|
||||
return a * (1.0f - t);
|
||||
if (a is Alignment && b is Alignment)
|
||||
return Alignment.lerp(a, b, t);
|
||||
if (a is AlignmentDirectional && b is AlignmentDirectional)
|
||||
return AlignmentDirectional.lerp(a, b, t);
|
||||
if (a is Alignment _a && b is Alignment _b)
|
||||
return Alignment.lerpAlignment(_a, _b, t);
|
||||
if (a is AlignmentDirectional _ad && b is AlignmentDirectional _bd)
|
||||
return AlignmentDirectional.lerpAlignmentDirectional(_ad, _bd, t);
|
||||
return new _MixedAlignment(
|
||||
MathUtils.lerpNullableFloat(a._x, b._x, t),
|
||||
MathUtils.lerpNullableFloat(a._start, b._start, t),
|
||||
|
@ -191,7 +191,7 @@ namespace Unity.UIWidgets.painting {
|
|||
);
|
||||
}
|
||||
|
||||
public static Alignment lerp(Alignment a, Alignment b, float t) {
|
||||
public static Alignment lerpAlignment(Alignment a, Alignment b, float t) {
|
||||
if (a == null && b == null) {
|
||||
return null;
|
||||
}
|
||||
|
@ -390,7 +390,7 @@ namespace Unity.UIWidgets.painting {
|
|||
return new AlignmentDirectional(start % other, y % other);
|
||||
}
|
||||
|
||||
static AlignmentDirectional lerp(AlignmentDirectional a, AlignmentDirectional b, float t) {
|
||||
public static AlignmentDirectional lerpAlignmentDirectional(AlignmentDirectional a, AlignmentDirectional b, float t) {
|
||||
D.assert(t != null);
|
||||
if (a == null && b == null)
|
||||
return null;
|
||||
|
|
|
@ -21,7 +21,7 @@ namespace Unity.UIWidgets.rendering {
|
|||
}
|
||||
|
||||
public override Alignment lerp(float t) {
|
||||
return Alignment.lerp(begin, end, t);
|
||||
return Alignment.lerpAlignment(begin, end, t);
|
||||
}
|
||||
}
|
||||
public class AlignmentGeometryTween : Tween<AlignmentGeometry> {
|
||||
|
|
Загрузка…
Ссылка в новой задаче