def triangle(times: np.ndarray, amp: complex, period: float, phase: float = <NUM_LIT:0>) -> np.ndarray:
return amp*(-<NUM_LIT:2>*np.abs(sawtooth(times, <NUM_LIT:1>, period, (phase-np.pi/<NUM_LIT:2>)/<NUM_LIT:2>)) + <NUM_LIT:1>).astype(np.complex_)<EOL>
Continuous triangle wave.

    Args:
        times: Times to output wave for.
        amp: Pulse amplitude. Wave range is [-amp, amp].
        period: Pulse period, units of dt.
        phase: Pulse phase.