mirror of
https://github.com/chylex/Hardcore-Ender-Expansion-2.git
synced 2025-04-11 03:15:44 +02:00
Add Vec3d.directionTowards extension
This commit is contained in:
parent
d4dd22e5b8
commit
f4f883f731
@ -62,3 +62,7 @@ fun Vec3d.offsetTowards(other: Vec3d, progress: Double): Vec3d{
|
||||
z + (other.z - z) * progress
|
||||
)
|
||||
}
|
||||
|
||||
fun Vec3d.directionTowards(target: Vec3d): Vec3d{
|
||||
return target.subtract(this).normalize()
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user