Skip to content

lfegg/complex

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

This repository provides methods to calculate with complex numbers.

let a =  {real: 1.0, imag: -1.0}
// Addition
let b = a + a
// Substraction
let c = b - a
// Multiplication
let d = a * b 
// Negation
let e = - a
// Division
let f = a / b 
// Abs / length
let g = a.abs()
// Conjugate
let h = a.conjugate()
// Reciprocal
let i = a.reciprocal()

Installation

moon add justjoheinz/complex

Moon version

tested with moon 0.1.20250721 (1581c56 2025-07-21)

About

complex numbers for MoonBit

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • MoonBit 100.0%