Documentation ¶
Index ¶
- type Complex
- func (c *Complex[T]) Add(other *Complex[T]) *Complex[T]
- func (c *Complex[T]) FromNumber(n T)
- func (c *Complex[T]) FromString(s string)
- func (c *Complex[T]) Mul(other *Complex[T]) *Complex[T]
- func (c *Complex[T]) New() *Complex[T]
- func (c *Complex[T]) String() string
- func (c *Complex[T]) Sub(other *Complex[T]) *Complex[T]
- type CustomNumeric
- type Rational
- func (r *Rational[T]) Add(other *Rational[T]) *Rational[T]
- func (r *Rational[T]) FromNumber(n T)
- func (r *Rational[T]) FromString(s string)
- func (r *Rational[T]) Mul(other *Rational[T]) *Rational[T]
- func (r *Rational[T]) New() *Rational[T]
- func (r *Rational[T]) String() string
- func (r *Rational[T]) Sub(other *Rational[T]) *Rational[T]
- type StdlibIntegers
- type StdlibNumeric
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Complex ¶
type Complex[T StdlibNumeric] struct { // contains filtered or unexported fields }
func (*Complex[T]) FromNumber ¶
func (c *Complex[T]) FromNumber(n T)
func (*Complex[T]) FromString ¶
type CustomNumeric ¶
type CustomNumeric[N StdlibNumeric, T any] interface { comparable fmt.Stringer FromString(string) FromNumber(N) New() T Add(T) T Sub(T) T Mul(T) T }
type Rational ¶
type Rational[T StdlibIntegers] struct { // contains filtered or unexported fields }
func (*Rational[T]) FromNumber ¶
func (r *Rational[T]) FromNumber(n T)
func (*Rational[T]) FromString ¶
Click to show internal directories.
Click to hide internal directories.