aboutsummaryrefslogtreecommitdiff
path: root/doc/Manual/en/BH_Math.pod
blob: f1d6d8e931e4db0cadd8abb0baf6fe94072218a9 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
=encoding UTF-8


=head1 NAME

BH_Math - Mathematical functions


=head1 SYNTAX

 #include <BH/Math.h>

 cc prog.c -o prog -lbh


=head1 DESCRIPTION

The BH_Math library provides a set of mathematical functions for various 
calculations.


=head1 API CALLS


=head2 BH_Lerpf

 float BH_Lerpf(float a,
                float b, 
                float t);

Interpolates the value between I<a> and I<b> with a given coefficient I<t>.


=head2 BH_Triangle3fBarycentric

 void BH_Triangle3fBarycentric(const float a[3],
                               const float b[3],
                               const float c[3],
                               const float point[3],
                               float out[3]);

Calculates the barycentric coordinates of the I<point> relative to the 
triangle defined by points I<a>, I<b>, I<c>.

The I<out> parameter describes the resulting vector.


=head1 SEE ALSO

L<BH>