mirror of
https://github.com/Drezil/imgui.git
synced 2024-12-18 06:06:35 +00:00
Compile fixes
This commit is contained in:
parent
91684a428b
commit
fdc8c0722f
12
imgui.cpp
12
imgui.cpp
@ -5891,9 +5891,9 @@ void ImDrawList::AddPolyline(const ImVec2* points, const int points_count, ImU32
|
||||
const ImVec2& v0 = points[i];
|
||||
const ImVec2& v1 = points[ni];
|
||||
ImVec2 diff = v1 - v0;
|
||||
float d = ImLength(diff);
|
||||
float d = ImLengthSqr(diff);
|
||||
if (d > 0)
|
||||
diff *= 1.0f/d;
|
||||
diff *= 1.0f/sqrtf(d);
|
||||
temp_normals[i].x = diff.y;
|
||||
temp_normals[i].y = -diff.x;
|
||||
}
|
||||
@ -5925,10 +5925,6 @@ void ImDrawList::AddPolyline(const ImVec2* points, const int points_count, ImU32
|
||||
temp_inner[ni] = points[ni] - dm;
|
||||
}
|
||||
|
||||
if (!closed)
|
||||
{
|
||||
}
|
||||
|
||||
const ImU32 col_trans = col & 0x00ffffff;
|
||||
|
||||
int vertex_count = count*12;
|
||||
@ -5972,9 +5968,9 @@ void ImDrawList::AddConvexPolyFilled(const ImVec2* points, const int points_coun
|
||||
const ImVec2& v0 = points[j];
|
||||
const ImVec2& v1 = points[i];
|
||||
ImVec2 diff = v1 - v0;
|
||||
float d = ImLength(diff);
|
||||
float d = ImLengthSqr(diff);
|
||||
if (d > 0)
|
||||
diff *= 1.0f/d;
|
||||
diff *= 1.0f/sqrtf(d);
|
||||
temp_normals[j].x = diff.y;
|
||||
temp_normals[j].y = -diff.x;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user