1
0
mirror of https://github.com/DigvijaysinhGohil/Godot-Shader-Lib.git synced 2025-09-19 20:05:57 +08:00
Files
Godot-Shader-Lib/documentation/Nodes/Maths/Vector/Distance/ChebyshevDistance.md
2024-07-21 16:39:45 +05:30

1.0 KiB

Chebyshev Distance node

Returns the distance between two points using Chebyshev distance matrix.


Controls

Options Description
Vector2, Vector3 Vector type to use for calculation

Inputs

Name Type Binding Description
a Dynamic vector none Point a
b Dynamic vector none Point b
power float none Power to use for Chebyshev distance

Outputs

Name Type Binding Description
distance float None Distance between 2 points

ShaderInc location
res://addons/ShaderLib/Maths/Maths.gdshaderinc

Method signature
For 2D - float chebyshev_distance_2d(vec2 point1, vec2 point2, float power)
For 3D - float chebyshev_distance_3d(vec3 point1, vec3 point2, float power)

Parameters for 2D

Name Type Description
point1 vec2 Point a
point2 vec2 Point b
power float Power for Chebyshev distance

Parameters for 3D

Name Type Description
point1 vec3 Point a
point2 vec3 Point b
power float Power for Chebyshev distance