当前位置: 首页>>代码示例>>C++>>正文


C++ ry函数代码示例

本文整理汇总了C++中ry函数的典型用法代码示例。如果您正苦于以下问题:C++ ry函数的具体用法?C++ ry怎么用?C++ ry使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。


在下文中一共展示了ry函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。

示例1: random_robot_pos2

static Pos2 random_robot_pos2(const FieldGeometry *f) {
  std::uniform_real_distribution<Float> rx(
      -f->field_length / 2 + ROBOT_DIAM / 2,
      f->field_length / 2 + ROBOT_DIAM / 2);
  std::uniform_real_distribution<Float> ry(-f->field_width / 2 + ROBOT_DIAM / 2,
                                           f->field_width / 2 + ROBOT_DIAM / 2);
  std::uniform_real_distribution<Float> rw(-RAD(180), RAD(180));
  // return std::forward(rx(gen), ry(gen), rw(gen));
  return {rx(gen), ry(gen), rw(gen)};
}
开发者ID:gustavokcouto,项目名称:ssl-sim,代码行数:10,代码来源:sslsim.cpp

示例2: rtest_eq_dom_check

 RelTest
 rtest_eq_dom_check(View x, View y) {
   ViewRanges<View> rx(x), ry(y);
   while (rx() && ry()) {
     if (rx.max() < ry.min()) {
       ++rx;
     } else if (ry.max() < rx.min()) {
       ++ry;
     } else return RT_MAYBE;
   }
   return RT_FALSE;
 }
开发者ID:YoshihisaMaruya,项目名称:tool_test_chef,代码行数:12,代码来源:rel-test.hpp

示例3: rect

Path SVGRectElement::toPathData() const
{
    FloatRect rect(x().value(this), y().value(this), width().value(this), height().value(this));

    bool hasRx = hasAttribute(SVGNames::rxAttr);
    bool hasRy = hasAttribute(SVGNames::ryAttr);
    if (hasRx || hasRy) {
        float _rx = hasRx ? rx().value(this) : ry().value(this);
        float _ry = hasRy ? ry().value(this) : rx().value(this);
        return Path::createRoundedRectangle(rect, FloatSize(_rx, _ry));
    }

    return Path::createRectangle(rect);
}
开发者ID:flwh,项目名称:Alcatel_OT_985_kernel,代码行数:14,代码来源:SVGRectElement.cpp

示例4: x

KCanvasPath* SVGRectElement::toPathData() const
{
    float _x = x()->baseVal()->value(), _y = y()->baseVal()->value();
    float _width = width()->baseVal()->value(), _height = height()->baseVal()->value();

    bool hasRx = hasAttribute(String("rx").impl());
    bool hasRy = hasAttribute(String("ry").impl());
    if(hasRx || hasRy)
    {
        float _rx = hasRx ? rx()->baseVal()->value() : ry()->baseVal()->value();
        float _ry = hasRy ? ry()->baseVal()->value() : rx()->baseVal()->value();
        return KCanvasCreator::self()->createRoundedRectangle(_x, _y, _width, _height, _rx, _ry);
    }

    return KCanvasCreator::self()->createRectangle(_x, _y, _width, _height);
}
开发者ID:oroisec,项目名称:ios,代码行数:16,代码来源:SVGRectElement.cpp

示例5: ry

//////////////////////////////////////////////////////////////////////
/// @brief Add the circle and assign the position and radius with yellow
/// @param pos
/// @param vel
//////////////////////////////////////////////////////////////////////
void Physicsworld::addYellowObject(Vec4 pos,Vec4 vel)
{
  Rigidbody ry(pos, 1.0f, colour.yellow().r,colour.yellow().g,colour.yellow().b);

  ry.setVelocity(vel);
  Objectslist.push_back(ry);
}
开发者ID:yangg17,项目名称:box2d-,代码行数:12,代码来源:physicsworld.cpp

示例6: rx

void XYView::request(Requisition& req) const {
    TransformSetter::request(req);
    Requirement rx(xsize_orig_);
    Requirement ry(ysize_orig_);
    req.require_x(rx);
    req.require_y(ry);
}
开发者ID:vortexlaboratory,项目名称:neuron,代码行数:7,代码来源:xyview.cpp

示例7: rx

void VStrut::request(Requisition& requisition) const {
    Coord height = ascent_ + descent_;
    Requirement rx(natural_, stretch_, shrink_, 0);
    Requirement ry(height, 0, 0, (height == 0) ? 0 : descent_ / height);
    requisition.require(Dimension_X, rx);
    requisition.require(Dimension_Y, ry);
}
开发者ID:LambdaCalculus379,项目名称:SLS-1.02,代码行数:7,代码来源:layout.c

示例8: shapeMarginBounds

LineSegment RectangleShape::getExcludedInterval(LayoutUnit logicalTop, LayoutUnit logicalHeight) const
{
    const FloatRect& bounds = shapeMarginBounds();
    if (bounds.isEmpty())
        return LineSegment();

    float y1 = logicalTop.toFloat();
    float y2 = (logicalTop + logicalHeight).toFloat();

    if (y2 < bounds.y() || y1 >= bounds.maxY())
        return LineSegment();

    float x1 = bounds.x();
    float x2 = bounds.maxX();

    float marginRadiusX = rx() + shapeMargin();
    float marginRadiusY = ry() + shapeMargin();

    if (marginRadiusY > 0) {
        if (y2 < bounds.y() + marginRadiusY) {
            float yi = y2 - bounds.y() - marginRadiusY;
            float xi = ellipseXIntercept(yi, marginRadiusX, marginRadiusY);
            x1 = bounds.x() + marginRadiusX - xi;
            x2 = bounds.maxX() - marginRadiusX + xi;
        } else if (y1 > bounds.maxY() - marginRadiusY) {
            float yi =  y1 - (bounds.maxY() - marginRadiusY);
            float xi = ellipseXIntercept(yi, marginRadiusX, marginRadiusY);
            x1 = bounds.x() + marginRadiusX - xi;
            x2 = bounds.maxX() - marginRadiusX + xi;
        }
    }

    return LineSegment(x1, x2);
}
开发者ID:335969568,项目名称:Blink-1,代码行数:34,代码来源:RectangleShape.cpp

示例9: cx

KCanvasPath* SVGEllipseElement::toPathData() const
{
    float _cx = cx()->baseVal()->value(), _cy = cy()->baseVal()->value();
    float _rx = rx()->baseVal()->value(), _ry = ry()->baseVal()->value();

    return KCanvasCreator::self()->createEllipse(_cx, _cy, _rx, _ry);
}
开发者ID:oroisec,项目名称:ios,代码行数:7,代码来源:SVGEllipseElement.cpp

示例10: ry

void TextLine::request(Requisition& requisition) const 
{
	FontBoundingBox fbb;
	font_->font_bbox(fbb);
	Text::request(requisition);
	Requirement ry(fbb.ascent() + fbb.descent(), 0, 0, 0);
	requisition.require(Dimension_Y, ry);
}
开发者ID:PNCG,项目名称:neuron,代码行数:8,代码来源:iv3text.cpp

示例11: post_false

 forceinline ExecStatus
 post_false(Home home, ViewArray<VX>& x, const IntSet& y) {
   for (int i = x.size(); i--; ) {
     IntSetRanges ry(y);
     GECODE_ME_CHECK(x[i].minus_r(home,ry,false));
   }
   return ES_OK;
 }
开发者ID:MGKhKhD,项目名称:easy-IP,代码行数:8,代码来源:rel.hpp

示例12: rx

//---------------------------------------------------------------------------
void __fastcall TForm1::updateedits(TObject *Sender)
{
        CSpinNr->MaxValue = Ilosc-1;
        EditX->Text = rx(L[Nr].x);
        EditY->Text = ry(L[Nr].y);
        EditQ->Text = L[Nr].q;
        EditR->Text = L[Nr].r;
}
开发者ID:MChudak,项目名称:builder_nbody,代码行数:9,代码来源:Unit1.cpp

示例13: drawpiece

void drawpiece (WINDOW *w, int y, int x, int rot, int piece, int color) {
  int c, d;

  wattrset (w, COLOR_PAIR (color));
  for (d = 0; d < 4; d++) for (c = 0; c < 4; c++)
    if (blocks[rx(rot % rots[piece], d, c)][piece][ry(rot % rots[piece], d, c)] != '.')
      mvwaddstr (w, d + y, (c + x - 1) * 2 - 1, "  "); /* 2 spaces */
}
开发者ID:Bencepapa,项目名称:CymonsGames,代码行数:8,代码来源:main.c

示例14: mapToVideo

QPointF VideoRendererItem::mapToVideo(const QPointF &pos) {
	auto hratio = d->mposd->targetSize().width()/d->vtx.width();
	auto vratio = d->mposd->targetSize().height()/d->vtx.height();
	auto p = pos - d->vtx.topLeft();
	p.rx() *= hratio;
	p.ry() *= vratio;
	return p;
}
开发者ID:akhilo,项目名称:cmplayer,代码行数:8,代码来源:videorendereritem.cpp

示例15: DivideByZeroException

Point&
Point::operator/=(const int divisor) {
    if (divisor == 0)
        throw DivideByZeroException();

    rx() /= divisor;
    ry() /= divisor;
    return *this;
}
开发者ID:cgyan,项目名称:Prism,代码行数:9,代码来源:Point.cpp


注:本文中的ry函数示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。