MCPcopy Create free account
hub / github.com/DOSNetwork/core / Add

Method Add

group/mod/int.go:207–213  ·  view source on GitHub ↗

Add sets the target to a + b mod M, where M is a's modulus..

(a, b kyber.Scalar)

Source from the content-addressed store, hash-verified

205
206// Add sets the target to a + b mod M, where M is a's modulus..
207func (i *Int) Add(a, b kyber.Scalar) kyber.Scalar {
208 ai := a.(*Int)
209 bi := b.(*Int)
210 i.M = ai.M
211 i.V.Add(&ai.V, &bi.V).Mod(&i.V, i.M)
212 return i
213}
214
215// Sub sets the target to a - b mod M.
216// Target receives a's modulus.

Callers 15

MergeErrorsFunction · 0.45
ListenMethod · 0.45
eventDispatchMethod · 0.45
mergeFunction · 0.45
TestServerFunction · 0.45
TestRequestFunction · 0.45
TestIntCloneFunction · 0.45
StartMethod · 0.45
mergeErrorsFunction · 0.45
fanInFunction · 0.45
onchainLoopMethod · 0.45
TestDialToEthDeadlineFunction · 0.45

Calls

no outgoing calls

Tested by 4

TestServerFunction · 0.36
TestRequestFunction · 0.36
TestIntCloneFunction · 0.36
TestDialToEthDeadlineFunction · 0.36