Merge pull request #862 from ousttrue/fix/max_variadic_argument_gc

Do not use the variadic max to avoid gc
This commit is contained in:
ousttrue 2021-04-12 16:27:56 +09:00 committed by GitHub
commit f38840614d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 3 additions and 3 deletions

View File

@ -267,7 +267,7 @@ namespace VRM
{
Position = transform.TransformPoint(collider.Offset);
var ls = transform.lossyScale;
var scale = Mathf.Max(ls.x, ls.y, ls.z);
var scale = Mathf.Max(Mathf.Max(ls.x, ls.y), ls.z);
Radius = scale * collider.Radius;
}
}

View File

@ -36,8 +36,8 @@ namespace VRM
get
{
return Mathf.Max(
transform.lossyScale.x,
transform.lossyScale.y,
Mathf.Max(transform.lossyScale.x,
transform.lossyScale.y),
transform.lossyScale.z
);
}