From f034ca73a08085f10d155d534bdd4e069043d674 Mon Sep 17 00:00:00 2001 From: "Andrii Doroshenko (Xrayez)" Date: Fri, 3 Jul 2020 01:21:08 +0300 Subject: [PATCH] Prefer `Math::sqrt` in `ImageBlender::stamp_rect` Using Godot's math is recommended as it may provide the same functionality across platforms. --- core/image/image_blender.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/core/image/image_blender.cpp b/core/image/image_blender.cpp index 55c2b6a4..ee44a756 100644 --- a/core/image/image_blender.cpp +++ b/core/image/image_blender.cpp @@ -138,7 +138,7 @@ void ImageBlender::stamp_rect(const Ref p_src, const Rect2 &p_src_rect, R float delta_x = end_point.x - start_point.x; float delta_y = end_point.y - start_point.y; - float distance = sqrt(delta_x * delta_x + delta_y * delta_y); + float distance = Math::sqrt(delta_x * delta_x + delta_y * delta_y); float step_x = 0.0; float step_y = 0.0;