mirror of
https://github.com/godotengine/godot.git
synced 2025-10-20 00:13:30 +00:00
Rename Vector2.tangent() to Vector2.orthogonal()
This commit is contained in:
parent
d834789f47
commit
a24c38d1a8
21 changed files with 42 additions and 42 deletions
|
@ -524,7 +524,7 @@ void RendererCanvasCull::canvas_item_add_line(RID p_item, const Point2 &p_from,
|
|||
Item::CommandPrimitive *line = canvas_item->alloc_command<Item::CommandPrimitive>();
|
||||
ERR_FAIL_COND(!line);
|
||||
if (p_width > 1.001) {
|
||||
Vector2 t = (p_from - p_to).tangent().normalized();
|
||||
Vector2 t = (p_from - p_to).orthogonal().normalized();
|
||||
line->points[0] = p_from + t * p_width;
|
||||
line->points[1] = p_from - t * p_width;
|
||||
line->points[2] = p_to - t * p_width;
|
||||
|
@ -600,7 +600,7 @@ void RendererCanvasCull::canvas_item_add_polyline(RID p_item, const Vector<Point
|
|||
if (i == pc - 1) {
|
||||
t = prev_t;
|
||||
} else {
|
||||
t = (p_points[i + 1] - p_points[i]).normalized().tangent();
|
||||
t = (p_points[i + 1] - p_points[i]).normalized().orthogonal();
|
||||
if (i == 0) {
|
||||
prev_t = t;
|
||||
}
|
||||
|
@ -650,7 +650,7 @@ void RendererCanvasCull::canvas_item_add_polyline(RID p_item, const Vector<Point
|
|||
if (i == pc - 1) {
|
||||
t = prev_t;
|
||||
} else {
|
||||
t = (p_points[i + 1] - p_points[i]).normalized().tangent();
|
||||
t = (p_points[i + 1] - p_points[i]).normalized().orthogonal();
|
||||
if (i == 0) {
|
||||
prev_t = t;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue