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


C++ vector2::x方法代码示例

本文整理汇总了C++中vector2::x方法的典型用法代码示例。如果您正苦于以下问题:C++ vector2::x方法的具体用法?C++ vector2::x怎么用?C++ vector2::x使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在vector2的用法示例。


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

示例1: m

vector4 vector4::Transform(const vector2& v, const matrix& m)
{
	vector4 result = vector4(	
						(v.x() * m(0,0)) + (v.y() * m(1,0)) + m(3,0),
						(v.x() * m(0,1)) + (v.y() * m(1,1)) + m(3,1),
						(v.x() * m(0,2)) + (v.y() * m(1,2)) + m(3,2),
						(v.x() * m(0,3)) + (v.y() * m(1,3)) + m(3,3));
	return result;
	
}
开发者ID:lsempe,项目名称:uipg,代码行数:10,代码来源:vector.cpp

示例2: x

const vector2 vector2::operator / (const vector2 &v2) const
{
	vector2 r;
	r.x() = x() / v2.x();
	r.y() = y() / v2.y();
	return r;
}
开发者ID:lsempe,项目名称:uipg,代码行数:7,代码来源:vector.cpp

示例3: trunk

static vector2 trunk(const vector2& v, number smallestVal)
{
	vector2 t;
	t.x() = smallestVal * round(v.x() / smallestVal);
	t.y() = smallestVal * round(v.y() / smallestVal);
	return t;
}
开发者ID:bsumirak,项目名称:ugcore,代码行数:7,代码来源:file_io_tikz.cpp

示例4: init

bool QtWindowSystem::init(const vector2<int>& r, int /*bpp*/, bool /*fullscreen*/)
{
	if (view_ == nullptr)
	{
		// check for Qt Application class instance
		if (QApplication::instance() == nullptr)
		{
			int argc = 0;
			static QApplication application(argc, nullptr);
		}
		view_ = new QtView;
		view_->setGeometry(0, 0, r.x(), r.y());
		set_format(WindowContextFormat());
	}

	return true;
}
开发者ID:icedmaster,项目名称:mhe,代码行数:17,代码来源:qt_window_system.cpp

示例5:

// Equality operations
bool vector2::operator == (const vector2 &v) const
{
	return ((x() == v.x()) && (y() == v.y()));
}
开发者ID:lsempe,项目名称:uipg,代码行数:5,代码来源:vector.cpp


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