1
0
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:
chylex 2019-06-21 18:21:36 +02:00
parent d4dd22e5b8
commit f4f883f731

View File

@ -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()
}