Skip to content

Commit

Permalink
docs: update README with example of usage via class instantiation
Browse files Browse the repository at this point in the history
  • Loading branch information
edelveart committed Jan 1, 2025
1 parent 0efac9d commit 2ccdca3
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,8 @@ import { SpaceFigNumbers } from "fignumbers";
const config = { start: 1n, m: 5n, step: 1n };

// 3. Choose the type of space figurate number you want (pyramidal, cubic, etc.)
const pyramidalNumbers = SpaceFigNumbers.generate("pyramidal", config);
const pyramidalSequence = new SpaceFigNumbers("pyramidal");
const pyramidalNumbers= pyramidalSequence.generate(config);

// 4. Get ready to see the magic happen! First 7 pyramidal numbers with m = 5n:
console.log("First 7 pyramidal numbers with m = 5n:");
Expand Down

0 comments on commit 2ccdca3

Please # to comment.