Skip to content

Add more functions#57

Merged
notKamui merged 3 commits intonotKamui:devfrom
EgorBron:new-functions
Apr 22, 2025
Merged

Add more functions#57
notKamui merged 3 commits intonotKamui:devfrom
EgorBron:new-functions

Conversation

@EgorBron
Copy link

closes #56

New functions added:

  • sign(expr) returns sign of expression (-1, 0 or 1)
  • nthrt(expr_a, expr_pow) extracts a root of nth power
  • trunc(expr) truncates decimal part
  • min(expr...)/max(expr...)/avg(expr...)/median(expr...) returns minimal/maximal/average/median value from given arguments
  • percentile(expr_perc, expr_a) gets percentile of expr_a
  • rand(expr...) either generates a random double (zero arguments), or generates a random integer up to expr (one argument), or selects a random value of given arguments (two or more arguments)
  • randRange(expr_start, expr_end, expr_step) generates a random double in range start..end with step
  • bool(expr) converts expression to 'boolean' form (zero or one)

Copy link
Owner

@notKamui notKamui left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you also draft changes to the README too ? I will complete it if not to my taste so don't worry too much.

EgorBron and others added 2 commits April 22, 2025 12:15
Co-authored-by: notKamui <46132319+notKamui@users.noreply.github.com>
@EgorBron EgorBron requested a review from notKamui April 22, 2025 09:28
@notKamui
Copy link
Owner

Good job, thank you !

@notKamui notKamui merged commit 4a8068d into notKamui:dev Apr 22, 2025
1 check passed
@notKamui notKamui mentioned this pull request Apr 22, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants