using Lerp

This commit is contained in:
Ben Cragg 2019-01-29 11:45:00 +00:00
parent 2e275ab0d5
commit 13171c409b
1 changed files with 1 additions and 1 deletions

View File

@ -431,7 +431,7 @@ func (c Circle) Union(d Circle) Circle {
// Calculate center for encompassing Circle
theta := .5 + (biggerC.Radius-smallerC.Radius)/(2*dist)
center := smallerC.Center.Scaled(1 - theta).Add(biggerC.Center.Scaled(theta))
center := Lerp(smallerC.Center, biggerC.Center, theta)
return Circle{
Radius: r,