abs() public method

The argument can be any valid expression as long as it resolves to a number.
See also: https://docs.mongodb.org/manual/reference/operator/aggregation/abs/
Since: 1.3
public abs ( mixed | self $number )
$number mixed | self
示例#1
0
 /**
  * Returns the absolute value of a number.
  *
  * The <number> argument can be any valid expression as long as it resolves
  * to a number.
  *
  * @see https://docs.mongodb.org/manual/reference/operator/aggregation/abs/
  * @see Expr::abs
  * @param mixed|Expr $number
  * @return self
  *
  * @since 1.3
  */
 public function abs($number)
 {
     $this->expr->abs($number);
     return $this;
 }