Calculate

Calculate

  • Docs
  • Help
  • Blog

›Math

Getting Started

  • Installation
  • Updating Calculate

Math

  • Sum
  • Difference
  • Product
  • Quotient
  • Remainder
  • Power
  • Square
  • Cube
  • Factorial

Statistics

  • Mean
  • Median
  • Mode
  • Range

Square

Gets the sqaure of a given number.

Syntax

sqaure(a: number): number

Parameters

a: number - Given number to be sqaured.

Returns

number - The resulting sqaure.

Error

Throws an error if the length of arguments is not equal to 1.

Import

import { sqaure } from '@princedev/calculate';

Examples

Basic usage with a given number.

const result = sqaure(2);

result would be 4

const result = sqaure(-8);

result would be 64

Last updated on 5/6/2020 by Prince Neil Cedrick Castro
← PowerCube →
  • Syntax
    • Parameters
    • Returns
    • Error
  • Import
  • Examples
Calculate
Docs
Getting StartedGuides
Package
NPMGitHubStar
More
HelpBlog
aws.cedi@gmail.com
Copyright © 2020 Calculate