Skip to content

dos_negate

Dale Fugier edited this page Nov 8, 2023 · 2 revisions

Negates a list or series of numbers. Note, a negated vector has the same magnitude as before, but its direction is now opposite.

Syntax

(dos_negate number1 ...)
(dos_negate list1 ...)

Parameters

number1 ...

The series of numbers.

list1 ...

The series of numeric lists.

Returns

The negated numbers, if successful.

nil on error.

Example

Command: (dos_negate '(1 1 2 2 2 3 4 4 5 6 7 7 8 9))
(-1 -1 -2 -2 -2 -3 -4 -4 -5 -6 -7 -7 -8 -9)

Command: (dos_negate 1 1 2 2 2 3 4 4 5 6 7 7 8 9)
(-1 -1 -2 -2 -2 -3 -4 -4 -5 -6 -7 -7 -8 -9)

Command: (dos_negate '(3 2))
(-3 -2)
Clone this wiki locally