Skip to content

five-on-it / packages/sim/src/vehicle / crossesNailStrip

Function: crossesNailStrip() ​

crossesNailStrip(strips, x0, z0, x1, z1): boolean

Defined in: packages/sim/src/vehicle.ts:760

Whether the ground segment from (x0, z0) to (x1, z1) touches a nail strip: both ends are taken into the strip's frame (u along its long axis, which is +x turned by yaw toward +z, v across it) and the segment's parameter range [0, 1] is narrowed by the strip's extent along each axis; it touches when something is left.

Parameters ​

strips ​

readonly NailStripDef[]

x0 ​

number

z0 ​

number

x1 ​

number

z1 ​

number

Returns ​

boolean