diff options
author | David Thompson <dthompson2@worcester.edu> | 2020-04-08 17:04:36 -0400 |
---|---|---|
committer | David Thompson <dthompson2@worcester.edu> | 2020-04-08 17:04:36 -0400 |
commit | c256f4a4c619bd0f7c410550e4569f4d2b5e2653 (patch) | |
tree | 2518a0992063a52b2f7d9fcdc6c159fcd17149e0 /doc/api.texi | |
parent | acb0d035419ed230a97fb3ac4c67c115d96eb592 (diff) |
doc: Add docs for various undocumented procedures.
Diffstat (limited to 'doc/api.texi')
-rw-r--r-- | doc/api.texi | 35 |
1 files changed, 34 insertions, 1 deletions
diff --git a/doc/api.texi b/doc/api.texi index 99fadce..9bdb48a 100644 --- a/doc/api.texi +++ b/doc/api.texi @@ -579,6 +579,25 @@ Twice @var{pi}. Return the cotangent of @var{z}. @end deffn +@deffn {Procedure} clamp min max x +Restrict @var{x} to the inclusive range defined by @var{min} and +@var{max}. This procedure assumes that @var{min} is actually less +than @var{max}. +@end deffn + +@deffn {Procedure} lerp start end alpha +Linearly interpolate the numbers @var{start} and @var{end} using the +factor @var{alpha}, a number in the range [0, 1]. +@end deffn + +@deffn {Procedure} degrees->radians degrees +Convert @var{degrees} to radians. +@end deffn + +@deffn {Procedure} degrees->radians radians +Convert @var{radians} to degrees. +@end deffn + @node Vectors @subsection Vectors @@ -735,6 +754,11 @@ Return the magnitude of the 3D vector @var{v}. Return the dot product of the 3D vectors @var{v1} and @var{v2}. @end deffn +@deffn {Procedure} vec3-cross v1 v2 +Return a new 3D vector containing the cross product of @var{v1} and +@var{v2}. +@end deffn + @deffn {Procedure} vec3-normalize v Return the normalized form of the 3D vector @var{v}. @end deffn @@ -790,6 +814,11 @@ Perform an in-place modification of the 3D vector @var{v} by multiplying it by @var{x}, a 3D vector or a scalar. @end deffn +@deffn {Procedure} vec3-cross! dest v1 v2 +Compute the cross product of the 3D vectors @var{v1} and @var{v2} and +store the result in @var{dest}. +@end deffn + @node Rectangles @subsection Rectangles @@ -1730,7 +1759,8 @@ Textures are essentially images: a 2D grid of color values. The working with texture objects. @deffn {Procedure} load-image file [#:min-filter nearest] @ - [#:mag-filter nearest] [#:wrap-s repeat] [#:wrap-t repeat] + [#:mag-filter nearest] [#:wrap-s repeat] [#:wrap-t repeat] @ + [#:transparent-color] Load the image data from @var{file} and return a new texture object. @@ -1743,6 +1773,9 @@ coordinates that are greater than @code{1.0}. Possible values are @code{repeat}, @code{clamp}, @code{clamp-to-border}, and @code{clamp-to-edge}. +For color-keyed images (images where a specific color should be made +transparent), specify the appropriate @var{transparent-color}. + @end deffn @deffn {Procedure} texture? obj |