You've already forked godot
mirror of
https://github.com/godotengine/godot.git
synced 2025-11-04 12:00:25 +00:00
Rename Vector2.tangent() to Vector2.orthogonal()
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user