diff --git a/scripts/courseGenerator/FieldworkCourseMultiVehicle.lua b/scripts/courseGenerator/FieldworkCourseMultiVehicle.lua index 5a634db45..71209fd7a 100644 --- a/scripts/courseGenerator/FieldworkCourseMultiVehicle.lua +++ b/scripts/courseGenerator/FieldworkCourseMultiVehicle.lua @@ -232,8 +232,7 @@ function FieldworkCourseMultiVehicle:generateCenter() -- if there are no headlands, or there are, but we start working in the middle, then use the -- designated start location, otherwise the point where the innermost headland ends. if #self.headlands == 0 then - -- the virtual headland the center uses is the combined working width - self.context:setHeadlandWidthForAdjustment(self.context.nVehicles * self.context.workingWidth) + -- the virtual headland the center uses is the single working width, no need for adjusted headland width self.center = CourseGenerator.Center(self.context, self.boundary, nil, self.context.startLocation, self.bigIslands) else -- The center is generated with the combined width of all vehicles and it assumes that the headland diff --git a/scripts/geometry/Vector.lua b/scripts/geometry/Vector.lua index 0429a9c70..139f7d3da 100644 --- a/scripts/geometry/Vector.lua +++ b/scripts/geometry/Vector.lua @@ -130,7 +130,7 @@ end -- meta function to divide Vectors function Vector.__div(a,b) assert(a:is_a(Vector) and type(b) == "number", "div: wrong argument types (expected and )") - return Vector(a.x / b, a.y / b) + return Vector(CpMathUtil.divide(a.x, b), CpMathUtil.divide(a.y, b)) end -- meta function to check if Vectors have the same values