Table of Contents

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

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