File: INSTRUCTIONS.sb

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 (30 lines) | stat: -rw-r--r-- 2,018 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
\h1\Function Reference\h1\
This is where you will find a \b\reference of all the functions that PyGLM provides\b\.

Most functions are \b\overloaded\b\, i.e. they accept more than one type of argument and may or may not behave differently depending on the type of argument(s).
Where possible, I tried to \b\compromise between exactness and readability\b\ of the supported data types.
Therefore there are some \b\types\b\ that are \b\placeholders\b\ for others.
Here are a few examples:
\tbl\
Name \-\ Description
\i\number\i\ \-\ Can be \b\(any) numerical type\b\, usually \code\float\code\ or \code\int\code\.
\i\vecN\i\ \-\ Can be \b\any\b\ or most of the available \b\vector\b\ types of \b\any length\b\.
\i\vec3\i\ \-\ Can be \b\any\b\ or most of the available \b\vector\b\ types of \b\length 3\b\.
\i\fvecN\i\ \-\ A \b\float vector\b\ of \b\any length\b\.
\i\matNxM\i\ \-\ Can be \b\any\b\ or most of the available \b\matrix\b\ types of \b\any shape\b\.
\i\matSxS\i\ \-\ Can be \b\any\b\ or most of the available \b\matrix\b\ types of \b\square shape\b\.
\i\quat\i\ \-\ \b\Any\b\ type of \b\quaternion\b\.
\tbl\

If different combinations of input arguments are possible, \b\multiple ways to call a particular function are presented\b\.

Example:
\raw\#### <code>glm.<code>**abs**(**x**: *float*) -\\> *float*</code></code>\raw\
\raw\&emsp;&emsp;\raw\Returns \code\x\code\ if \code\x >= 0\code\; otherwise it returns \code\-x\code\.

\raw\#### <code>glm.<code>**abs**(**x**: *vecN*) -\\> *vecN*</code></code>\raw\
\raw\&emsp;&emsp;\raw\For each component \code\c\code\ of \code\x\code\,
\raw\&emsp;&emsp;\raw\Returns \code\c\code\ if \code\c >= 0\code\; otherwise it returns \code\-c\code\.

This means that you can call the \code\glm.abs\code\ function with a \code\float\code\ \code\"x"\code\ and it will return a \code\float\code\ value
(as you can tell by the \raw\<code> -> *float*</code>\raw\), or you can call it with a vector, e.g. a \code\vec3\code\ and get a vector (\code\vec3\code\ in this case) back.