math

package module
v2.0.2 Latest Latest
Warning

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

Go to latest
Published: Dec 23, 2025 License: MIT Imports: 1 Imported by: 0

README

Math

Math is a simple go module that provides utility functions for doing arithmetic. It was created as a way to explore how to create go modules.

Documentation

Overview

The math package contains a few utility functions to do basic arithmetic.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Add

func Add[T Number](i, j T) T

Add adds two numbers and returns the result. A number can be any int or float type.

Read more about addition at [mathisfun].

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