chapter 0.1.0

An implementation of the Yarn Spinner runtime.
Documentation
title: Start
---
floor 1.1 = {floor(1.1)}
floor 2.0 = {floor(2.0)}
floor -1.1 = {floor(-1.1)}
floor -2.0 = {floor(-2.0)}

ceil 1.1 = {ceil(1.1)}
ceil 2.0 = {ceil(2.0)}
ceil -1.1 = {ceil(-1.1)}
ceil -2.0 = {ceil(-2.0)}

int 1.1 = {int(1.1)}
int 2.0 = {int(2.0)}
int -1.1 = {int(-1.1)}
int -2.0 = {int(-2.0)}

// float precision makes these tricky without further functions, skipping tests for now
// decimal 1.353 = {decimal(1.353)}
// decimal -1.554 = {decimal(-1.554)}

dec 10.0 = {dec(10.0)}
dec 10.1 = {dec(10.1)}

inc 11.0 = {inc(11.0)}
inc 10.1 = {inc(10.1)}

round 10.1 = {round(10.1)}
round 10.9 = {round(10.9)}
round 10.5 = {round(10.5)}

round_places 10.155 to 2 places = {round_places(10.155, 2)}
round_places 10.955 to 0 places = {round_places(10.955, 0)}
round_places 10.50011 to 4 places = {round_places(10.50011, 4)}

clamp 1 (2->4) = {clamp(1, 2, 4)}
clamp 2 (2->4) = {clamp(2, 2, 4)}
clamp 3 (2->4) = {clamp(3, 2, 4)}
clamp 4 (2->4) = {clamp(4, 2, 4)}
clamp 5 (2->4) = {clamp(5, 2, 4)}

clampf 1.0 (2.1->2.9) = {clamp(1.0, 2.1, 2.9)}
clampf 2.1 (2.1->2.9) = {clamp(2.1, 2.1, 2.9)}
clampf 2.4 (2.1->2.9) = {clamp(2.4, 2.1, 2.9)}
clampf 2.9 (2.1->2.9) = {clamp(2.9, 2.1, 2.9)}
clampf 3.0 (2.1->2.9) = {clamp(3.0, 2.1, 2.9)}

===