public static EntityWorldPos Clamp(EntityWorldPos value, EntityWorldPos max, EntityWorldPos min) { return(new EntityWorldPos( Clamp(value.X, max.X, min.X), Clamp(value.Y, max.Y, min.Y), Clamp(value.Z, max.Z, min.Z))); }
public static double Distance(EntityWorldPos pos1, EntityWorldPos pos2) { float x = pos1.X - pos2.X; float y = pos1.Y - pos2.Y; float z = pos1.Z - pos2.Z; return(Math.Sqrt(x * x + y * y + z * z)); }
public static EntityWorldPos Add(EntityWorldPos pos, float x, float y, float z) { return(new EntityWorldPos(pos.X + x, pos.Y + y, pos.Z + z)); }