mirror of
https://github.com/ultimatepp/ultimatepp.git
synced 2026-05-15 22:02:49 -06:00
.examples improved Android builder example
git-svn-id: svn://ultimatepp.org/upp/trunk@8659 f0d560ea-af0d-0410-9eb7-867de7ffcac7
This commit is contained in:
parent
a33bb135de
commit
4387f25403
7 changed files with 150 additions and 80 deletions
|
|
@ -26,7 +26,6 @@ Vector::Vector(const Vector& vec)
|
|||
for(int i = 0; i < size; i++) {
|
||||
data[i] = vec.data[i];
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -35,6 +34,28 @@ Vector::~Vector()
|
|||
delete[] data;
|
||||
}
|
||||
|
||||
float Vector::Get(int id) const
|
||||
{
|
||||
return this->data[id];
|
||||
}
|
||||
|
||||
int Vector::GetSize() const
|
||||
{
|
||||
return this->size;
|
||||
}
|
||||
|
||||
void Vector::Set(int id, float value)
|
||||
{
|
||||
this->data[id] = value;
|
||||
}
|
||||
|
||||
void Vector::MultipleByScalar(float scalar)
|
||||
{
|
||||
for(int i = 0; i < size; i++) {
|
||||
this->data[i] *= scalar;
|
||||
}
|
||||
}
|
||||
|
||||
std::string Vector::ToString() const
|
||||
{
|
||||
std::stringstream ss;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue