Naming of methods in num::complex

⚓ Rust    📅 2025-08-23    👤 surdeus    👁️ 13      

surdeus

Warning

This post was published 101 days ago. The information described in this article may have changed.

A little question on naming in num::complex.

num::complex calls

  • "norm" what is typically called the modulus or absolute value (i.e. (re^2+im^2).sqrt()) and
  • "norm_sqr" what is typically called the norm (i.e. re^2+im^2).

I found this when comparing fn-names in the documentation to Complex number - Wikipedia.

2 posts - 2 participants

Read full topic

🏷️ Rust_feed