Explorer

std.abs

description
Return absolute value of a number
type
Fn(x: Number) -> Number
expression
fn(x$1) =>
  match @core.less-than(left: $1, right: 0) {
    true =>
      @core.minus(left: 0, right: $1),
    false =>
      $1
  }
visibility
public
std.abs (project definy, branch main, snapshot CfIAXM725tR74SWd4aoTUz4-JJQfqnllblZbQ2Sv204)
id: rMMq-aGp02AI-AWPJhQ5AJRJQmwVLI8n2gLw1OMJDaw
content hash: YProgshVB7HcYcp_4nKJIZ5d5o4nMWVbDcorFxiEnGs