Skip to content

Modern Math COne

Paul Squires edited this page Oct 19, 2026 · 5 revisions

Home › Math Library › Math Library › COne

COne

Returns the complex number 1.

Syntax

COne( ) as Complex

Notes

  • A function rather than a constant — see CZero.
  • z * CReciprocal( z ) is COne( ) to within rounding, which is the identity most worth asserting about a complex division.

Examples

#import "std/numeric"
using numeric

print CToString( COne( ) )                 '' 1+0i
print CToString( CSet( 3, 4 ) * COne( ) )  '' 3+4i   -- the multiplicative identity

Library: Math Library
Category: Math Library
Documented under: Members

Clone this wiki locally