Skip to content

Latest commit

 

History

History
160 lines (109 loc) · 2.21 KB

File metadata and controls

160 lines (109 loc) · 2.21 KB
title
Maths

import Tabs from '@theme/Tabs'; import TabItem from '@theme/TabItem';

add

<Tabs defaultValue="signature" values={[ {label: 'Signature', value: 'signature'}, {label: 'Example', value: 'example'}, ]}

(a Number) (b Number) | add | (a + b Number)
1 2 add => 3

Adds two numbers and returns the result. This operation promotes the result to a proper type based on argument types.

cmp

<Tabs defaultValue="signature" values={[ {label: 'Signature', value: 'signature'}, {label: 'Example', value: 'example'}, ]}

(a Number) (b Number) | cmp | (a == b Bool)
7 2 cmp => false

Compares two numbers.

div

<Tabs defaultValue="signature" values={[ {label: 'Signature', value: 'signature'}, {label: 'Example', value: 'example'}, ]}

(a Number) (b Number) | div | (a / b Number)
1 2 div => 0.5

Divides a by b and returns the result. This operation promotes the result to a proper type based on argument types.

mult

<Tabs defaultValue="signature" values={[ {label: 'Signature', value: 'signature'}, {label: 'Example', value: 'example'}, ]}

(a Number) (b Number) | mult | (a * b Number)
2 2 mult => 4

Multiplies two numbers and returns the result. This operation promotes the result to a proper type based on argument types.

sub

<Tabs defaultValue="signature" values={[ {label: 'Signature', value: 'signature'}, {label: 'Example', value: 'example'}, ]}

(a Number) (b Number) | sub | (a - b Number)
1 2 sub => -1

Subtracts b from a and returns the result. This operation promotes the result to a proper type based on argument types.