User Tools

Site Tools


Sidebar



Minetest Forum
Content Database
Git Repository
Bug Tracker
Website

dev:core:funref:atfloor

atfloor

Rounds down a number. Symbolic reference to math.floor.

Note: this page has been written for Advtrains 2.0.1 TSS and Minetest 5.1.0. Examples and practices described in this page don't take advantage of improvements introduced in later releases.

Syntax

atfloor(x)

Parameters

  • x (number): a number.

Returns

The rounded down number.

Examples

advtrains.is_track_and_drives_on("advtrains:dtrack", nil) -- true
advtrains.is_track_and_drives_on("advtrains:dtrack", {}) -- true
advtrains.is_track_and_drives_on("advtrains:dtrack", { nonstandard = true }) -- false
advtrains.is_track_and_drives_on("tracklib:custom", { nonstandard = true }) -- false unless tracklib:custom has been registered with track type "nonstandard"

In source code

advtrains/helpers.lua, line 67:

atfloor.lua
atfloor = math.floor
dev/core/funref/atfloor.txt · Last modified: 2020/01/22 10:52 by admin