def _calculate_dash_pattern(self) -> list[float]:
        """
        Builds dash pattern list dynamically, ensuring the correct number of dashes and spacing per each distance that
        must be covered
        """
        dash_len = self.dash_len
        distance = self._get_distance(self.start, self.end)
        dash_count = distance // dash_len

        dash_count = 19 if dash_count < 20 else dash_count - 1
        dash_len = (distance - dash_len) / dash_count

        # Must have an even amount of dashes
        if dash_count % 2 != 0:
            dash_count -= 1
            dash_len = distance / dash_count

        pattern = [dash_len] * int(dash_count)
        pattern.append(distance - (dash_len * dash_count))  # Remaining width is last tick
        pattern.append(0.0)
        return pattern

        Builds dash pattern list dynamically, ensuring the correct number of dashes and spacing per each distance that
        must be covered
        
angrmanagement/ui/widgets/qgraph_arrow.py