Skip to content

Need More Math (Example: square root) #292

Description

@johnsfuller

It'd be huge to have a math function where we could directly use python math functions here.
EDIT In this case I guess it'd be java math class

Solution 1:

Here is a link that includes a table summary of those functions above.

In hubl, it would possibly look like this:

{% set num = 100 %}
{{ math.sqrt( num ) }}  {# outputs 10 #}

Solution 2:

You could just use filters for more common math functions like square root sqrt

{% set num = 100 %}
{{ num|sqrt }}  {# outputs 10 #}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions