This repository has been archived on 2026-04-17. You can view files and clone it. You cannot open issues or pull requests or push a commit.
Files
bhlib/doc/Manual/ru/BH_Line.pod

61 lines
1.7 KiB
Plaintext
Raw Permalink Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
=encoding UTF-8
=head1 НАИМЕНОВАНИЕ
BH_Line - прямая на плоскости.
=head1 СИНТАКСИС
#include <BH/Math.h>
cc prog.c -o prog -lbh
=head1 ОПИСАНИЕ
Модуль BH_Line предоставляет функции для работы с прямыми на плоскости. Он
позволяет вычислять коэффициенты прямой по двум точкам, находить расстояние от
точки до прямой и определять ближайшую точку на прямой к заданной точке.
=head1 API ВЫЗОВЫ
=head2 BH_LineFromPoints
int BH_LineFromPoints(const float a[2],
const float b[2],
float out[3]);
Вычисляет коэффициенты прямой на плоскости по двум точкам I<a> и I<b>.
Параметр I<out> описывает результирующую прямую на плоскости.
В случае успеха функция возвращает 0, в противном случае - код ошибки.
=head2 BH_LineDistance
float BH_LineDistance(const float line[3],
const float point[2]);
Вычисляет расстояние от точки I<point> до прямой I<line>.
=head2 BH_LineClosestPoint
void BH_LineClosestPoint(const float line[3],
const float point[2],
float out[2]);
Вычисляет ближайшую точку на прямой I<line> к другой точке I<point>.
Параметр I<out> описывает результирующую точку.
=head1 СМ. ТАКЖЕ
L<BH>