# Function: pair()

[**lifecycle-kit**](https://jonbogaty.com/lifecycle-kit/api/readme/index.md)

***

[lifecycle-kit](https://jonbogaty.com/lifecycle-kit/api/readme/index.md) / [forms](https://jonbogaty.com/lifecycle-kit/api/forms/readme/index.md) / pair


# Function: pair() {#function-pair}


> **pair**(`unit`, `params`): [`Path`](https://jonbogaty.com/lifecycle-kit/api/forms/interfaces/path/index.md)

Defined in: [forms/rules/pair.ts:47](https://github.com/jbcom/lifecycle-kit/blob/074e4e7b8038d3e2de9eb44c4b5b5aee0ef02b48/src/forms/rules/pair.ts#L47)

Emit a left/right mirrored pair of a unit appendage at an attachment
point.

The unit appendage is authored pointing away from the body along +y; `pair`
translates it into place and reflects the second copy across the body's long
axis, so a leg drawn once becomes bilaterally symmetric for free rather than
needing to be authored twice.


## Which axis {#which-axis}


`path.ts` fixes the convention that a body's long axis runs along +x, and
`repeat` callers lay bodies out that way. The plane of bilateral symmetry
therefore CONTAINS the x axis, so mirroring to the other side negates y and
leaves x alone. Both members keep their station along the body: a foreleg
mirrors to the opposite foreleg, not to a hindleg.

This rule originally mirrored across x instead, which negates the along-body
coordinate. Both members came out sharing a y and straddling the origin in x
— one at the head end, one at the tail end, both on the same side of the
animal. Every existing test still passed, because none of them asserted
which axis separated the two members; it took drawing a creature to see it.


## Parameters {#parameters}



### unit {#unit}


[`Path`](https://jonbogaty.com/lifecycle-kit/api/forms/interfaces/path/index.md)


### params {#params}


[`PairParams`](https://jonbogaty.com/lifecycle-kit/api/forms/interfaces/pairparams/index.md)


## Returns {#returns}


[`Path`](https://jonbogaty.com/lifecycle-kit/api/forms/interfaces/path/index.md)
