DOMMatrix* DOMMatrix::SetMatrixValue(const nsAString& aTransformList, ErrorResult& aRv) { SVGTransformListParser parser(aTransformList); if (!parser.Parse()) { aRv.Throw(NS_ERROR_DOM_SYNTAX_ERR); } else { mMatrix3D = nullptr; mMatrix2D = new gfx::Matrix(); gfxMatrix result; const nsTArray<nsSVGTransform>& mItems = parser.GetTransformList(); for (uint32_t i = 0; i < mItems.Length(); ++i) { result.PreMultiply(mItems[i].GetMatrix()); } SetA(result._11); SetB(result._12); SetC(result._21); SetD(result._22); SetE(result._31); SetF(result._32); } return this; }
void LLBC_MD5::MD5GroupDigest::SetInfo(uint32 a, uint32 b, uint32 c, uint32 d) { SetA(a); SetB(b); SetC(c); SetD(d); }
DOMMatrixReadOnly* DOMMatrixReadOnly::SetMatrixValue(const nsAString& aTransformList, ErrorResult& aRv) { // An empty string is a no-op. if (aTransformList.IsEmpty()) { return this; } gfx::Matrix4x4 transform; bool contains3dTransform = false; if (!ServoCSSParser::ParseTransformIntoMatrix(aTransformList, contains3dTransform, transform.components)) { aRv.Throw(NS_ERROR_DOM_SYNTAX_ERR); return nullptr; } if (!contains3dTransform) { mMatrix3D = nullptr; mMatrix2D = new gfx::Matrix(); SetA(transform._11); SetB(transform._12); SetC(transform._21); SetD(transform._22); SetE(transform._41); SetF(transform._42); } else { mMatrix3D = new gfx::Matrix4x4(transform); mMatrix2D = nullptr; } return this; }
O3QuadraticEquation<TYPE>& O3QuadraticEquation<TYPE>::Set(TYPE high_x_intercept, TYPE y_intercept) { double x_sq = -( O3recip(high_x_intercept*high_x_intercept) ) * y_intercept; double constant = y_intercept; SetA(x_sq); SetB(0); SetC(constant); return *this; }
LLBC_MD5::MD5GroupDigest &LLBC_MD5::MD5GroupDigest::operator +=(const LLBC_MD5::MD5GroupDigest &right) { SetA(GetA() + right.GetA()); SetB(GetB() + right.GetB()); SetC(GetC() + right.GetC()); SetD(GetD() + right.GetD()); return *this; }
JohanCity::JohanCity(int gridsize,float edgelen) { // Resize grid Resize(gridsize,edgelen); // Misc. checkid = 0; timingreport[0] = 0; clock = new Clock(false); // Set default user values SetPopulation(0); SetMoney(50000); SetR(50); // beginpop SetC(10); // 1 kantoortje? SetI(70); }
Triangle::Triangle(Point& a, Point& b, Point& c) { SetA(a); SetB(b); SetC(c); }
void JohanCity::AddC(int value) { SetC(cdemand + value); }