Hi there! Are you looking for the official Deno documentation? Try docs.deno.com for all your Deno learning needs.

sign

import { sign } from "https://raw.githubusercontent.com/JOTSR/Denum/master/mod.ts";

If the number is less than zero, return -1, otherwise return 1

function sign<T extends number | bigint>(n: T): T;
§
sign<T extends number | bigint>(n: T): T
[src]

§Type Parameters

§
T extends number | bigint
[src]

§Parameters

§
n: T
[src]
  • The number to get the sign of

§Return Type

§

number or bigint sign