1
0
mirror of https://github.com/DigvijaysinhGohil/Godot-Shader-Lib.git synced 2025-09-21 04:45:57 +08:00
Files
Godot-Shader-Lib/addons/ShaderLib/Maths/Vector/Distance/Chebyshev2D.gdshaderinc
2024-03-19 19:47:24 +05:30

4 lines
162 B
Plaintext

float chebyshev_distance_2d(vec2 point1, vec2 point2, float power) {
vec2 p = abs(point1 - point2);
return pow(pow(p.x, power) + pow(p.y, power), 1. / power);
}