Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
I
illuna-minetest
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Operate
Environments
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Illuna-Minetest
illuna-minetest
Commits
d915ca11
Commit
d915ca11
authored
9 years ago
by
est31
Browse files
Options
Downloads
Patches
Plain Diff
lua_api.txt: improve vector documentation
Before it rendered very badly in HTML. Also point out what vector.round does.
parent
3132bcb3
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
doc/lua_api.txt
+6
-7
6 additions, 7 deletions
doc/lua_api.txt
with
6 additions
and
7 deletions
doc/lua_api.txt
+
6
−
7
View file @
d915ca11
...
...
@@ -1688,16 +1688,15 @@ or string form, a ColorString (defined above):
`colorspec = "green"`
Spatial Vectors
--------------
* `vector.new([x[, y, z]])`: returns a vector.
* `x` is a table or the `x` position.
---------------
* `vector.new(a[, b, c])`: returns a vector:
* A copy of `a` if `a` is a vector.
* `{x = a, y = b, z = c}`, if all `a, b, c` are defined
* `vector.direction(p1, p2)`: returns a vector
* `vector.distance(p1, p2)`: returns a number
* `vector.length(v)`: returns a number
* `vector.normalize(v)`: returns a vector
* `vector.round(v)`: returns a vector
* `vector.round(v)`: returns a vector
, each dimension rounded to floor
* `vector.apply(v, func)`: returns a vector
* `vector.equals(v1, v2)`: returns a boolean
...
...
@@ -1709,7 +1708,7 @@ For the following functions `x` can be either a vector or a number:
* `vector.divide(v, x)`: returns a scaled vector or Schur quotient
Helper functions
----------------
-
----------------
* `dump2(obj, name="_", dumped={})`
* Return object serialized as a string, handles reference loops
* `dump(obj, dumped={})`
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment