mirror of
https://github.com/godotengine/godot.git
synced 2026-01-06 10:11:57 +03:00
Remove ABS in favor of Math::abs
This commit is contained in:
@@ -1767,7 +1767,7 @@ void RasterizerCanvasGLES3::light_update_directional_shadow(RID p_rid, int p_sha
|
||||
|
||||
Vector2 center = p_clip_rect.get_center();
|
||||
|
||||
float to_edge_distance = ABS(light_dir.dot(p_clip_rect.get_support(-light_dir)) - light_dir.dot(center));
|
||||
float to_edge_distance = Math::abs(light_dir.dot(p_clip_rect.get_support(-light_dir)) - light_dir.dot(center));
|
||||
|
||||
Vector2 from_pos = center - light_dir * (to_edge_distance + p_cull_distance);
|
||||
float distance = to_edge_distance * 2.0 + p_cull_distance;
|
||||
|
||||
@@ -1181,7 +1181,7 @@ void LightStorage::lightmap_tap_sh_light(RID p_lightmap, const Vector3 &p_point,
|
||||
return; // Nothing could be done.
|
||||
}
|
||||
|
||||
node = ABS(node) - 1;
|
||||
node = Math::abs(node) - 1;
|
||||
|
||||
uint32_t *tetrahedron = (uint32_t *)&lm->tetrahedra[node * 4];
|
||||
Vector3 points[4] = { lm->points[tetrahedron[0]], lm->points[tetrahedron[1]], lm->points[tetrahedron[2]], lm->points[tetrahedron[3]] };
|
||||
|
||||
Reference in New Issue
Block a user