Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 1 addition & 2 deletions scripts/courseGenerator/FieldworkCourseMultiVehicle.lua
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion scripts/geometry/Vector.lua
Original file line number Diff line number Diff line change
Expand Up @@ -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 <Vector> and <number>)")
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
Expand Down