Skip to content

Commit

Permalink
float最小値の代わりに0を返すように
Browse files Browse the repository at this point in the history
  • Loading branch information
gatosyocora committed Oct 8, 2020
1 parent b714725 commit 701444f
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions Assets/VRCAvatarEditor/Editor/DataClass/VRCAvatarBase.cs
Original file line number Diff line number Diff line change
Expand Up @@ -141,8 +141,7 @@ private float CalculateAvatarHeight(Vector3 footPosition,

private float CalculateMaxPositionInMesh(Transform meshTransform, Mesh mesh)
{
if (mesh is null) return float.MinValue;
return mesh.vertices.Select(v => meshTransform.TransformPoint(v).y).Max();
return mesh.vertices.Select(v => meshTransform.TransformPoint(v).y).DefaultIfEmpty().Max();
}
}
}
Expand Down

0 comments on commit 701444f

Please sign in to comment.