ballistics_hold_point_in_reticle

Function ballistics_hold_point_in_reticle 

Source
#[unsafe(no_mangle)]
pub unsafe extern "C" fn ballistics_hold_point_in_reticle( drop_mil: c_double, wind_mil: c_double, magnification: c_double, marks: *const c_double, marks_len: c_int, focal_plane: c_int, reference_magnification: c_double, out: *mut FFIReticleHold, ) -> c_int
Expand description

Place an angular firing solution in a reticle (MBA-1361).

marks is a FLAT array of 2 * marks_len doubles laid out as [down_0, right_0, down_1, right_1, ...] in NOMINAL milliradians (as etched; for a second-focal-plane reticle that means “true at reference_magnification”). focal_plane is FFI_RETICLE_FIRST_FOCAL_PLANE or FFI_RETICLE_SECOND_FOCAL_PLANE; reference_magnification is consulted only in the second-focal-plane case.

Returns FFI_RETICLE_OK and writes out on success, or one of the negative FFI_RETICLE_ERR_* codes, in which case out is left untouched.

§Safety

marks must point to at least 2 * marks_len readable doubles and out to one writable FFIReticleHold. marks_len is validated against 1..=MAX_FFI_RETICLE_MARKS BEFORE any element is read (MBA-1407 lesson: the bound is the only thing standing between a caller typo and an out-of-range read).