addint

package module
v2.0.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 17, 2024 License: BSD-3-Clause Imports: 1 Imported by: 0

Documentation

Overview

addint package provides ability to add two integers.

This is a simple package that provides a function to add two integers. https://www.mathsisfun.com/numbers/addition.html

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AddInt

func AddInt[T Number](a, b T) T

AddInt returns the sum of two integers.

Example:

fmt.Println(AddInt(1, 2)) // Output: 3

Types

type Number

type Number interface {
	constraints.Integer | constraints.Float
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL