File: compatibility.md

package info (click to toggle)
python-pyglm 2.8.2-2
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 6,008 kB
  • sloc: cpp: 53,029; python: 3,683; makefile: 7
file content (54 lines) | stat: -rw-r--r-- 2,966 bytes parent folder | download
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
51
52
53
54
[//]: # (generated using SlashBack 0.2.0)

  
# compatibility methods  
The following methods are all part of the **compatibility methods**\.  
Provide functions to increase the compatibility with Cg and HLSL languages\.  
## Table of contents  
  
* [**atan2** function](#atan2-function)  
* [**isfinite** function](#isfinite-function)  
* [**lerp** function](#lerp-function)  
* [**saturate** function](#saturate-function)  
  
### atan2\(\) function  
#### <code>glm.<code>**atan2**(**y**: *float*, **x**: *float*) -\> *float*</code></code>  
&emsp;&emsp;Arc tangent\. Returns an angle whose tangent is ``` y / x ```\. The signs of ``` x ``` and ``` y ``` are used to  
&emsp;&emsp;determine what quadrant the angle is in\. The range of values returned by this function  
&emsp;&emsp;is ``` [-PI, PI] ```\. Results are undefined if ``` x ``` and ``` y ``` are both ``` 0 ```\.  
&emsp;&emsp;Alias for ``` atan ```\.  
  
#### <code>glm.<code>**atan2**(**y**: *vecN*, **x**: *vecN*) -\> *vecN*</code></code>  
&emsp;&emsp;Returns ``` atan(y[i], x[i]) ``` for every index ``` i ```\.  
&emsp;&emsp;Alias for ``` atan ```\.  
  
### isfinite\(\) function  
#### <code>glm.<code>**isfinite**(**x**: *float*) -\> *bool*</code></code>  
&emsp;&emsp;Test whether or not a scalar is a finite value\.  
  
#### <code>glm.<code>**isfinite**(**x**: *vecN*) -\> *bvecN*</code></code>  
&emsp;&emsp;Test whether or not each vector component is a finite value\.  
  
### lerp\(\) function  
#### <code>glm.<code>**lerp**(**x**: *float*, **y**: *float*, **a**: *float*) -\> *float*</code></code>  
&emsp;&emsp;Returns ``` x * (1.0 - a) + y * a ```, i\.e\., the linear blend of ``` x ``` and ``` y ``` using the  
&emsp;&emsp;floating\-point value ``` a ```\. The value for ``` a ``` is not restricted to the range ``` [0, 1] ```\.  
  
#### <code>glm.<code>**lerp**(**x**: *vecN*, **y**: *vecN*, **a**: *float*) -\> *vecN*</code></code>  
&emsp;&emsp;Returns ``` x * (1.0 - a) + y * a ```, i\.e\., the linear blend of ``` x ``` and ``` y ``` using the  
&emsp;&emsp;floating\-point value ``` a ```\. The value for ``` a ``` is not restricted to the range ``` [0, 1] ```\.  
  
#### <code>glm.<code>**lerp**(**x**: *vecN*, **y**: *vecN*, **a**: *vecN*) -\> *vecN*</code></code>  
&emsp;&emsp;Returns ``` x * (1.0 - a) + y * a ```, i\.e\., the linear blend of ``` x ``` and ``` y ``` using the  
&emsp;&emsp;vector ``` a ```\. The value for ``` a ``` is not restricted to the range ``` [0, 1] ```\.  
  
#### <code>glm.<code>**lerp**(**x**: *quat*, **y**: *quat*, **a**: *float*) -\> *quat*</code></code>  
&emsp;&emsp;Linear interpolation of two quaternions\. The interpolation is oriented\.  
  
### saturate\(\) function  
#### <code>glm.<code>**saturate**(**x**: *float*) -\> *float*</code></code>  
&emsp;&emsp;Returns ``` clamp(x, 0, 1) ```\.  
  
#### <code>glm.<code>**saturate**(**x**: *vecN*) -\> *vecN*</code></code>  
&emsp;&emsp;Returns ``` clamp(x, 0, 1) ```\.