abs

Summary

Get the absolute value of a number.

Signatures

Click on a signature to select it and view its documentation.

Usage

public static int abs(int x)

Returns

The absolute value of the number.

Parameters

x

The number to get the absolute value of.

Description

Gets the absolute value for a signed, 32-bit integer value.

Examples

Basic Usage
1
2
3
import System;
 
int x = Math.abs(-100); // 100

Share

HTML | BBCode | Direct Link