github.com/aws/aws-cryptographic-material-providers-library/releases/go/smithy-dafny-standard-library@v0.2.0/Math_/Math_.go (about)

     1  // Package _Math
     2  // Dafny module _Math compiled into Go
     3  
     4  package _Math
     5  
     6  import (
     7  	os "os"
     8  
     9  	m_Relations "github.com/aws/aws-cryptographic-material-providers-library/releases/go/smithy-dafny-standard-library/Relations"
    10  	m_Seq_MergeSort "github.com/aws/aws-cryptographic-material-providers-library/releases/go/smithy-dafny-standard-library/Seq_MergeSort"
    11  	m_Wrappers "github.com/aws/aws-cryptographic-material-providers-library/releases/go/smithy-dafny-standard-library/Wrappers"
    12  	m__System "github.com/dafny-lang/DafnyRuntimeGo/v4/System_"
    13  	_dafny "github.com/dafny-lang/DafnyRuntimeGo/v4/dafny"
    14  )
    15  
    16  var _ = os.Args
    17  var _ _dafny.Dummy__
    18  var _ m__System.Dummy__
    19  var _ m_Wrappers.Dummy__
    20  var _ m_Relations.Dummy__
    21  var _ m_Seq_MergeSort.Dummy__
    22  
    23  type Dummy__ struct{}
    24  
    25  // Definition of class Default__
    26  type Default__ struct {
    27  	dummy byte
    28  }
    29  
    30  func New_Default___() *Default__ {
    31  	_this := Default__{}
    32  
    33  	return &_this
    34  }
    35  
    36  type CompanionStruct_Default___ struct {
    37  }
    38  
    39  var Companion_Default___ = CompanionStruct_Default___{}
    40  
    41  func (_this *Default__) Equals(other *Default__) bool {
    42  	return _this == other
    43  }
    44  
    45  func (_this *Default__) EqualsGeneric(x interface{}) bool {
    46  	other, ok := x.(*Default__)
    47  	return ok && _this.Equals(other)
    48  }
    49  
    50  func (*Default__) String() string {
    51  	return "_Math.Default__"
    52  }
    53  func (_this *Default__) ParentTraits_() []*_dafny.TraitID {
    54  	return [](*_dafny.TraitID){}
    55  }
    56  
    57  var _ _dafny.TraitOffspring = &Default__{}
    58  
    59  func (_static *CompanionStruct_Default___) Min(a _dafny.Int, b _dafny.Int) _dafny.Int {
    60  	if (a).Cmp(b) < 0 {
    61  		return a
    62  	} else {
    63  		return b
    64  	}
    65  }
    66  func (_static *CompanionStruct_Default___) Max(a _dafny.Int, b _dafny.Int) _dafny.Int {
    67  	if (a).Cmp(b) < 0 {
    68  		return b
    69  	} else {
    70  		return a
    71  	}
    72  }
    73  func (_static *CompanionStruct_Default___) Abs(a _dafny.Int) _dafny.Int {
    74  	if (a).Sign() != -1 {
    75  		return a
    76  	} else {
    77  		return (_dafny.Zero).Minus(a)
    78  	}
    79  }
    80  
    81  // End of class Default__