A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://github.com/StefH/Handlebars.Net.Helpers/wiki/Math below:

Math · Handlebars-Net/Handlebars.Net.Helpers Wiki · GitHub

These helpers provide the ability to perform some calculations within a template.

Summary Add two numbers Returns Sum of inputs Remarks Parameters input1 First input input2 Second input

Context

{
    "a": 1,
    "b": 2,
    "c": 3
}

Usage

<strong>result:</strong>
{{Math.Add a b}}
{{Math.Add b c}}
{{Math.Add c 4}}
{{Math.Add 4 5}}

Returns

<strong>result:</strong>
3
5
7
9
Summary Rounds input up to the nearest whole number Returns Ceiling of input Remarks Parameters input input

Context

{
    "a": 1.23,
    "b": 2.45,
    "c": 3.67
}

Usage

<strong>result:</strong>
{{Math.Ceiling a}}
{{Math.Ceiling b}}
{{Math.Ceiling c}}
{{Math.Ceiling 4.89}}

Returns

<strong>result:</strong>
2
3
4
5
Summary Divide first input by second input Returns Result of first input divided by second input Remarks Parameters input1 First input input2 Second input

Context

{
    "a": 1,
    "b": 2,
    "c": 3
}

Usage

<strong>result:</strong>
{{Math.Divide a b}}
{{Math.Divide b c}}
{{Math.Divide c 4}}
{{Math.Divide 4 5}}

Returns

<strong>result:</strong>
0.5
0.666666666666667
0.75
0.8
Summary Rounds input down to the nearest whole number Returns Floor of input Remarks Parameters input input

Context

{
    "a": 1.23,
    "b": 2.45,
    "c": 3.67
}

Usage

<strong>result:</strong>
{{Math.Floor a}}
{{Math.Floor b}}
{{Math.Floor c}}
{{Math.Floor 4.89}}

Returns

<strong>result:</strong>
1
2
3
4
Summary Modulus of first over second input Returns Result of modulus of first input over second input Remarks Parameters input1 First input input2 Second input

Context

{
    "a": 1,
    "b": 2,
    "c": 3
}

Usage

<strong>result:</strong>
{{Math.Mod a b}}
{{Math.Mod b c}}
{{Math.Mod c 4}}
{{Math.Mod 4 5}}

Returns

<strong>result:</strong>
1
2
3
4
Summary Multiply first input by second input Returns Result of multiplication of first input and second input Remarks Parameters input1 First input input2 Second input

Context

{
    "a": 1,
    "b": 2,
    "c": 3
}

Usage

<strong>result:</strong>
{{Math.Multiply a b}}
{{Math.Multiply b c}}
{{Math.Multiply c 4}}
{{Math.Multiply 4 5}}

Returns

<strong>result:</strong>
2
6
12
20
Summary Rounds input to the nearest whole number Returns Rounded input Remarks Rounds depending on what side of the half the number falls on Parameters input input

Context

{
    "a": 1.23,
    "b": 2.45,
    "c": 3.67
}

Usage

<strong>result:</strong>
{{Math.Round a}}
{{Math.Round b}}
{{Math.Round c}}
{{Math.Round 4.89}}

Returns

<strong>result:</strong>
1
2
4
5
Summary Subtract second input from first Returns Result of subtracting the second input from first Remarks Parameters input1 First input input2 Second input

Context

{
    "a": 4,
    "b": 3,
    "c": 1
}

Usage

<strong>result:</strong>
{{Math.Subtract a b}}
{{Math.Subtract b c}}
{{Math.Subtract c 2}}
{{Math.Subtract 2 5}}

Returns

<strong>result:</strong>
1
2
-1
-3

RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4