diff options
Diffstat (limited to 'source/blender/nodes/geometry/nodes/node_geo_mesh_primitive_line.cc')
-rw-r--r-- | source/blender/nodes/geometry/nodes/node_geo_mesh_primitive_line.cc | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/source/blender/nodes/geometry/nodes/node_geo_mesh_primitive_line.cc b/source/blender/nodes/geometry/nodes/node_geo_mesh_primitive_line.cc index 5116e78fdda..8a2b054ece0 100644 --- a/source/blender/nodes/geometry/nodes/node_geo_mesh_primitive_line.cc +++ b/source/blender/nodes/geometry/nodes/node_geo_mesh_primitive_line.cc @@ -155,8 +155,8 @@ static void node_geo_exec(GeoNodeExecParams params) if (count_mode == GEO_NODE_MESH_LINE_COUNT_RESOLUTION) { /* Don't allow asymptotic count increase for low resolution values. */ const float resolution = std::max(params.extract_input<float>("Resolution"), 0.0001f); - const int count = total_delta.length() / resolution + 1; - const float3 delta = total_delta.normalized() * resolution; + const int count = math::length(total_delta) / resolution + 1; + const float3 delta = math::normalize(total_delta) * resolution; mesh = create_line_mesh(start, delta, count); } else if (count_mode == GEO_NODE_MESH_LINE_COUNT_TOTAL) { @@ -204,7 +204,7 @@ Mesh *create_line_mesh(const float3 start, const float3 delta, const int count) MutableSpan<MEdge> edges{mesh->medge, mesh->totedge}; short normal[3]; - normal_float_to_short_v3(normal, delta.normalized()); + normal_float_to_short_v3(normal, math::normalize(delta)); for (const int i : verts.index_range()) { copy_v3_v3(verts[i].co, start + delta * i); |