class Fox::FXVec2f
Public Class Methods
Source
SWIGINTERN VALUE _wrap_new_FXVec2f(int nargs, VALUE *args, VALUE self) {
int argc;
VALUE argv[2];
int ii;
argc = nargs;
if (argc > 2) SWIG_fail;
for (ii = 0; (ii < argc); ++ii) {
argv[ii] = args[ii];
}
if ((argc >= 0) && (argc <= 2)) {
int _v = 0;
if (argc <= 0) {
return _wrap_new_FXVec2f__SWIG_0(nargs, args, self);
}
{
int res = SWIG_AsVal_float(argv[0], NULL);
_v = SWIG_CheckState(res);
}
if (_v) {
if (argc <= 1) {
return _wrap_new_FXVec2f__SWIG_0(nargs, args, self);
}
{
int res = SWIG_AsVal_float(argv[1], NULL);
_v = SWIG_CheckState(res);
}
if (_v) {
return _wrap_new_FXVec2f__SWIG_0(nargs, args, self);
}
}
}
if (argc == 1) {
int _v = 0;
void *vptr = 0;
int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_FXVec2f, SWIG_POINTER_NO_NULL);
_v = SWIG_CheckState(res);
if (_v) {
return _wrap_new_FXVec2f__SWIG_1(nargs, args, self);
}
}
if (argc == 1) {
int _v = 0;
void *vptr = 0;
int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_float, 0);
_v = SWIG_CheckState(res);
if (_v) {
return _wrap_new_FXVec2f__SWIG_2(nargs, args, self);
}
}
fail:
Ruby_Format_OverloadedError( argc, 2, "FXVec2f.new",
" FXVec2f.new(FXfloat xx, FXfloat yy)\n"
" FXVec2f.new(FXVec2f const &v)\n"
" FXVec2f.new(FXfloat const v[])\n");
return Qnil;
}
Source
# File rdoc-sources/FXVec2f.rb, line 10 def initialize(xx=0.0, yy=0.0); end
Return an initialized FXVec2f instance.
Public Instance Methods
Source
SWIGINTERN VALUE _wrap_FXVec2f___mul__(int nargs, VALUE *args, VALUE self) {
int argc;
VALUE argv[3];
int ii;
argc = nargs + 1;
argv[0] = self;
if (argc > 3) SWIG_fail;
for (ii = 1; (ii < argc); ++ii) {
argv[ii] = args[ii-1];
}
if (argc == 2) {
int _v = 0;
void *vptr = 0;
int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_FXVec2f, 0);
_v = SWIG_CheckState(res);
if (_v) {
void *vptr = 0;
int res = SWIG_ConvertPtr(argv[1], &vptr, SWIGTYPE_p_FXVec2f, SWIG_POINTER_NO_NULL);
_v = SWIG_CheckState(res);
if (_v) {
return _wrap_FXVec2f___mul____SWIG_1(nargs, args, self);
}
}
}
if (argc == 2) {
int _v = 0;
void *vptr = 0;
int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_FXVec2f, 0);
_v = SWIG_CheckState(res);
if (_v) {
{
int res = SWIG_AsVal_float(argv[1], NULL);
_v = SWIG_CheckState(res);
}
if (_v) {
return _wrap_FXVec2f___mul____SWIG_0(nargs, args, self);
}
}
}
fail:
Ruby_Format_OverloadedError( argc, 3, "__mul__",
" FXVec2f __mul__(FXfloat n)\n"
" FXfloat __mul__(FXVec2f const &other)\n");
return Qnil;
}
Source
SWIGINTERN VALUE
_wrap_FXVec2f___add__(int argc, VALUE *argv, VALUE self) {
FXVec2f *arg1 = (FXVec2f *) 0 ;
FXVec2f *arg2 = 0 ;
void *argp1 = 0 ;
int res1 = 0 ;
void *argp2 = 0 ;
int res2 = 0 ;
FXVec2f result;
VALUE vresult = Qnil;
if ((argc < 1) || (argc > 1)) {
rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail;
}
res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_FXVec2f, 0 | 0 );
if (!SWIG_IsOK(res1)) {
SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "FXVec2f const *","operator +", 1, self ));
}
arg1 = reinterpret_cast< FXVec2f * >(argp1);
res2 = SWIG_ConvertPtr(argv[0], &argp2, SWIGTYPE_p_FXVec2f, 0 );
if (!SWIG_IsOK(res2)) {
SWIG_exception_fail(SWIG_ArgError(res2), Ruby_Format_TypeError( "", "FXVec2f const &","operator +", 2, argv[0] ));
}
if (!argp2) {
SWIG_exception_fail(SWIG_ValueError, Ruby_Format_TypeError("invalid null reference ", "FXVec2f const &","operator +", 2, argv[0]));
}
arg2 = reinterpret_cast< FXVec2f * >(argp2);
result = FXVec2f_operator_Sa_((FXVec2f const *)arg1,(FXVec2f const &)*arg2);
vresult = SWIG_NewPointerObj((new FXVec2f(result)), SWIGTYPE_p_FXVec2f, SWIG_POINTER_OWN | 0 );
return vresult;
fail:
return Qnil;
}
Add operator.
Source
SWIGINTERN VALUE
_wrap_FXVec2f___sub__(int argc, VALUE *argv, VALUE self) {
FXVec2f *arg1 = (FXVec2f *) 0 ;
FXVec2f *arg2 = 0 ;
void *argp1 = 0 ;
int res1 = 0 ;
void *argp2 = 0 ;
int res2 = 0 ;
FXVec2f result;
VALUE vresult = Qnil;
if ((argc < 1) || (argc > 1)) {
rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail;
}
res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_FXVec2f, 0 | 0 );
if (!SWIG_IsOK(res1)) {
SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "FXVec2f const *","operator -", 1, self ));
}
arg1 = reinterpret_cast< FXVec2f * >(argp1);
res2 = SWIG_ConvertPtr(argv[0], &argp2, SWIGTYPE_p_FXVec2f, 0 );
if (!SWIG_IsOK(res2)) {
SWIG_exception_fail(SWIG_ArgError(res2), Ruby_Format_TypeError( "", "FXVec2f const &","operator -", 2, argv[0] ));
}
if (!argp2) {
SWIG_exception_fail(SWIG_ValueError, Ruby_Format_TypeError("invalid null reference ", "FXVec2f const &","operator -", 2, argv[0]));
}
arg2 = reinterpret_cast< FXVec2f * >(argp2);
result = FXVec2f_operator_Ss_((FXVec2f const *)arg1,(FXVec2f const &)*arg2);
vresult = SWIG_NewPointerObj((new FXVec2f(result)), SWIGTYPE_p_FXVec2f, SWIG_POINTER_OWN | 0 );
return vresult;
fail:
return Qnil;
}
Subtraction operator.
Source
SWIGINTERN VALUE
_wrap_FXVec2f___neg__(int argc, VALUE *argv, VALUE self) {
FXVec2f *arg1 = (FXVec2f *) 0 ;
void *argp1 = 0 ;
int res1 = 0 ;
FXVec2f result;
VALUE vresult = Qnil;
if ((argc < 0) || (argc > 0)) {
rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail;
}
res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_FXVec2f, 0 | 0 );
if (!SWIG_IsOK(res1)) {
SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "FXVec2f const *","operator -", 1, self ));
}
arg1 = reinterpret_cast< FXVec2f * >(argp1);
result = FXVec2f_operator_Ss_((FXVec2f const *)arg1);
vresult = SWIG_NewPointerObj((new FXVec2f(result)), SWIGTYPE_p_FXVec2f, SWIG_POINTER_OWN | 0 );
return vresult;
fail:
return Qnil;
}
Subtraction operator.
Source
SWIGINTERN VALUE
_wrap_FXVec2f___div__(int argc, VALUE *argv, VALUE self) {
FXVec2f *arg1 = (FXVec2f *) 0 ;
FXfloat arg2 ;
void *argp1 = 0 ;
int res1 = 0 ;
float val2 ;
int ecode2 = 0 ;
FXVec2f result;
VALUE vresult = Qnil;
if ((argc < 1) || (argc > 1)) {
rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail;
}
res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_FXVec2f, 0 | 0 );
if (!SWIG_IsOK(res1)) {
SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "FXVec2f const *","operator /", 1, self ));
}
arg1 = reinterpret_cast< FXVec2f * >(argp1);
ecode2 = SWIG_AsVal_float(argv[0], &val2);
if (!SWIG_IsOK(ecode2)) {
SWIG_exception_fail(SWIG_ArgError(ecode2), Ruby_Format_TypeError( "", "FXfloat","operator /", 2, argv[0] ));
}
arg2 = static_cast< FXfloat >(val2);
result = FXVec2f_operator_Sd_((FXVec2f const *)arg1,arg2);
vresult = SWIG_NewPointerObj((new FXVec2f(result)), SWIGTYPE_p_FXVec2f, SWIG_POINTER_OWN | 0 );
return vresult;
fail:
return Qnil;
}
Source
SWIGINTERN VALUE
_wrap_FXVec2f___eq__(int argc, VALUE *argv, VALUE self) {
FXVec2f *arg1 = (FXVec2f *) 0 ;
FXVec2f *arg2 = 0 ;
void *argp1 = 0 ;
int res1 = 0 ;
void *argp2 = 0 ;
int res2 = 0 ;
bool result;
VALUE vresult = Qnil;
if ((argc < 1) || (argc > 1)) {
rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail;
}
res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_FXVec2f, 0 | 0 );
if (!SWIG_IsOK(res1)) {
SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "FXVec2f const *","operator ==", 1, self ));
}
arg1 = reinterpret_cast< FXVec2f * >(argp1);
res2 = SWIG_ConvertPtr(argv[0], &argp2, SWIGTYPE_p_FXVec2f, 0 );
if (!SWIG_IsOK(res2)) {
SWIG_exception_fail(SWIG_ArgError(res2), Ruby_Format_TypeError( "", "FXVec2f const &","operator ==", 2, argv[0] ));
}
if (!argp2) {
SWIG_exception_fail(SWIG_ValueError, Ruby_Format_TypeError("invalid null reference ", "FXVec2f const &","operator ==", 2, argv[0]));
}
arg2 = reinterpret_cast< FXVec2f * >(argp2);
result = (bool)FXVec2f_operator_Se__Se_((FXVec2f const *)arg1,(FXVec2f const &)*arg2);
vresult = SWIG_From_bool(static_cast< bool >(result));
return vresult;
fail:
return Qnil;
}
Equality comparison operator.
Source
SWIGINTERN VALUE
_wrap_FXVec2f___getitem__(int argc, VALUE *argv, VALUE self) {
FXVec2f *arg1 = (FXVec2f *) 0 ;
FXint arg2 ;
void *argp1 = 0 ;
int res1 = 0 ;
FXfloat result;
VALUE vresult = Qnil;
if ((argc < 1) || (argc > 1)) {
rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail;
}
res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_FXVec2f, 0 | 0 );
if (!SWIG_IsOK(res1)) {
SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "FXVec2f const *","__getitem__", 1, self ));
}
arg1 = reinterpret_cast< FXVec2f * >(argp1);
arg2 = NUM2INT(argv[0]);
result = (FXfloat)FXVec2f___getitem__((FXVec2f const *)arg1,arg2);
vresult = SWIG_From_float(static_cast< float >(result));
return vresult;
fail:
return Qnil;
}
Element accessor/slicing.
Source
SWIGINTERN VALUE
_wrap_FXVec2f___setitem__(int argc, VALUE *argv, VALUE self) {
FXVec2f *arg1 = (FXVec2f *) 0 ;
FXint arg2 ;
FXfloat arg3 ;
void *argp1 = 0 ;
int res1 = 0 ;
float val3 ;
int ecode3 = 0 ;
FXfloat result;
VALUE vresult = Qnil;
if ((argc < 2) || (argc > 2)) {
rb_raise(rb_eArgError, "wrong # of arguments(%d for 2)",argc); SWIG_fail;
}
res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_FXVec2f, 0 | 0 );
if (!SWIG_IsOK(res1)) {
SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "FXVec2f *","__setitem__", 1, self ));
}
arg1 = reinterpret_cast< FXVec2f * >(argp1);
arg2 = NUM2INT(argv[0]);
ecode3 = SWIG_AsVal_float(argv[1], &val3);
if (!SWIG_IsOK(ecode3)) {
SWIG_exception_fail(SWIG_ArgError(ecode3), Ruby_Format_TypeError( "", "FXfloat","__setitem__", 3, argv[1] ));
}
arg3 = static_cast< FXfloat >(val3);
result = (FXfloat)FXVec2f___setitem__(arg1,arg2,arg3);
vresult = SWIG_From_float(static_cast< float >(result));
return vresult;
fail:
return Qnil;
}
Element setter/slicing.
Source
SWIGINTERN VALUE
_wrap_FXVec2f_clamp(int argc, VALUE *argv, VALUE self) {
FXVec2f *arg1 = (FXVec2f *) 0 ;
FXfloat arg2 ;
FXfloat arg3 ;
void *argp1 = 0 ;
int res1 = 0 ;
float val2 ;
int ecode2 = 0 ;
float val3 ;
int ecode3 = 0 ;
FXVec2f *result = 0 ;
VALUE vresult = Qnil;
if ((argc < 2) || (argc > 2)) {
rb_raise(rb_eArgError, "wrong # of arguments(%d for 2)",argc); SWIG_fail;
}
res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_FXVec2f, 0 | 0 );
if (!SWIG_IsOK(res1)) {
SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "FXVec2f *","clamp", 1, self ));
}
arg1 = reinterpret_cast< FXVec2f * >(argp1);
ecode2 = SWIG_AsVal_float(argv[0], &val2);
if (!SWIG_IsOK(ecode2)) {
SWIG_exception_fail(SWIG_ArgError(ecode2), Ruby_Format_TypeError( "", "FXfloat","clamp", 2, argv[0] ));
}
arg2 = static_cast< FXfloat >(val2);
ecode3 = SWIG_AsVal_float(argv[1], &val3);
if (!SWIG_IsOK(ecode3)) {
SWIG_exception_fail(SWIG_ArgError(ecode3), Ruby_Format_TypeError( "", "FXfloat","clamp", 3, argv[1] ));
}
arg3 = static_cast< FXfloat >(val3);
result = (FXVec2f *) &(arg1)->clamp(arg2,arg3);
vresult = FXRbGetRubyObj(result, "FXVec2f *");
return vresult;
fail:
return Qnil;
}
Source
SWIGINTERN VALUE
_wrap_FXVec2f_dot(int argc, VALUE *argv, VALUE self) {
FXVec2f *arg1 = (FXVec2f *) 0 ;
FXVec2f *arg2 = 0 ;
void *argp1 = 0 ;
int res1 = 0 ;
void *argp2 = 0 ;
int res2 = 0 ;
FXfloat result;
VALUE vresult = Qnil;
if ((argc < 1) || (argc > 1)) {
rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail;
}
res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_FXVec2f, 0 | 0 );
if (!SWIG_IsOK(res1)) {
SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "FXVec2f const *","dot", 1, self ));
}
arg1 = reinterpret_cast< FXVec2f * >(argp1);
res2 = SWIG_ConvertPtr(argv[0], &argp2, SWIGTYPE_p_FXVec2f, 0 );
if (!SWIG_IsOK(res2)) {
SWIG_exception_fail(SWIG_ArgError(res2), Ruby_Format_TypeError( "", "FXVec2f const &","dot", 2, argv[0] ));
}
if (!argp2) {
SWIG_exception_fail(SWIG_ValueError, Ruby_Format_TypeError("invalid null reference ", "FXVec2f const &","dot", 2, argv[0]));
}
arg2 = reinterpret_cast< FXVec2f * >(argp2);
result = (FXfloat)FXVec2f_dot((FXVec2f const *)arg1,(FXVec2f const &)*arg2);
vresult = SWIG_From_float(static_cast< float >(result));
return vresult;
fail:
return Qnil;
}
Source
SWIGINTERN VALUE
_wrap_FXVec2f_hi(int argc, VALUE *argv, VALUE self) {
FXVec2f *arg1 = (FXVec2f *) 0 ;
FXVec2f *arg2 = 0 ;
void *argp1 = 0 ;
int res1 = 0 ;
void *argp2 = 0 ;
int res2 = 0 ;
FXVec2f result;
VALUE vresult = Qnil;
if ((argc < 1) || (argc > 1)) {
rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail;
}
res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_FXVec2f, 0 | 0 );
if (!SWIG_IsOK(res1)) {
SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "FXVec2f const *","hi", 1, self ));
}
arg1 = reinterpret_cast< FXVec2f * >(argp1);
res2 = SWIG_ConvertPtr(argv[0], &argp2, SWIGTYPE_p_FXVec2f, 0 );
if (!SWIG_IsOK(res2)) {
SWIG_exception_fail(SWIG_ArgError(res2), Ruby_Format_TypeError( "", "FXVec2f const &","hi", 2, argv[0] ));
}
if (!argp2) {
SWIG_exception_fail(SWIG_ValueError, Ruby_Format_TypeError("invalid null reference ", "FXVec2f const &","hi", 2, argv[0]));
}
arg2 = reinterpret_cast< FXVec2f * >(argp2);
result = FXVec2f_hi((FXVec2f const *)arg1,(FXVec2f const &)*arg2);
vresult = SWIG_NewPointerObj((new FXVec2f(result)), SWIGTYPE_p_FXVec2f, SWIG_POINTER_OWN | 0 );
return vresult;
fail:
return Qnil;
}
Source
SWIGINTERN VALUE
_wrap_FXVec2f_length(int argc, VALUE *argv, VALUE self) {
FXVec2f *arg1 = (FXVec2f *) 0 ;
void *argp1 = 0 ;
int res1 = 0 ;
FXfloat result;
VALUE vresult = Qnil;
if ((argc < 0) || (argc > 0)) {
rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail;
}
res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_FXVec2f, 0 | 0 );
if (!SWIG_IsOK(res1)) {
SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "FXVec2f const *","length", 1, self ));
}
arg1 = reinterpret_cast< FXVec2f * >(argp1);
result = (FXfloat)((FXVec2f const *)arg1)->length();
vresult = SWIG_From_float(static_cast< float >(result));
return vresult;
fail:
return Qnil;
}
Also aliased as: len
Source
SWIGINTERN VALUE
_wrap_FXVec2f_length2(int argc, VALUE *argv, VALUE self) {
FXVec2f *arg1 = (FXVec2f *) 0 ;
void *argp1 = 0 ;
int res1 = 0 ;
FXfloat result;
VALUE vresult = Qnil;
if ((argc < 0) || (argc > 0)) {
rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail;
}
res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_FXVec2f, 0 | 0 );
if (!SWIG_IsOK(res1)) {
SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "FXVec2f const *","length2", 1, self ));
}
arg1 = reinterpret_cast< FXVec2f * >(argp1);
result = (FXfloat)((FXVec2f const *)arg1)->length2();
vresult = SWIG_From_float(static_cast< float >(result));
return vresult;
fail:
return Qnil;
}
Also aliased as: len2
Source
SWIGINTERN VALUE
_wrap_FXVec2f_lo(int argc, VALUE *argv, VALUE self) {
FXVec2f *arg1 = (FXVec2f *) 0 ;
FXVec2f *arg2 = 0 ;
void *argp1 = 0 ;
int res1 = 0 ;
void *argp2 = 0 ;
int res2 = 0 ;
FXVec2f result;
VALUE vresult = Qnil;
if ((argc < 1) || (argc > 1)) {
rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail;
}
res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_FXVec2f, 0 | 0 );
if (!SWIG_IsOK(res1)) {
SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "FXVec2f const *","lo", 1, self ));
}
arg1 = reinterpret_cast< FXVec2f * >(argp1);
res2 = SWIG_ConvertPtr(argv[0], &argp2, SWIGTYPE_p_FXVec2f, 0 );
if (!SWIG_IsOK(res2)) {
SWIG_exception_fail(SWIG_ArgError(res2), Ruby_Format_TypeError( "", "FXVec2f const &","lo", 2, argv[0] ));
}
if (!argp2) {
SWIG_exception_fail(SWIG_ValueError, Ruby_Format_TypeError("invalid null reference ", "FXVec2f const &","lo", 2, argv[0]));
}
arg2 = reinterpret_cast< FXVec2f * >(argp2);
result = FXVec2f_lo((FXVec2f const *)arg1,(FXVec2f const &)*arg2);
vresult = SWIG_NewPointerObj((new FXVec2f(result)), SWIGTYPE_p_FXVec2f, SWIG_POINTER_OWN | 0 );
return vresult;
fail:
return Qnil;
}
Source
SWIGINTERN VALUE
_wrap_FXVec2f_normalize(int argc, VALUE *argv, VALUE self) {
FXVec2f *arg1 = (FXVec2f *) 0 ;
void *argp1 = 0 ;
int res1 = 0 ;
FXVec2f result;
VALUE vresult = Qnil;
if ((argc < 0) || (argc > 0)) {
rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail;
}
res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_FXVec2f, 0 | 0 );
if (!SWIG_IsOK(res1)) {
SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "FXVec2f const *","normalize", 1, self ));
}
arg1 = reinterpret_cast< FXVec2f * >(argp1);
result = FXVec2f_normalize((FXVec2f const *)arg1);
vresult = SWIG_NewPointerObj((new FXVec2f(result)), SWIGTYPE_p_FXVec2f, SWIG_POINTER_OWN | 0 );
return vresult;
fail:
return Qnil;
}
Source
SWIGINTERN VALUE
_wrap_FXVec2f_x_get(int argc, VALUE *argv, VALUE self) {
FXVec2f *arg1 = (FXVec2f *) 0 ;
void *argp1 = 0 ;
int res1 = 0 ;
FXfloat result;
VALUE vresult = Qnil;
if ((argc < 0) || (argc > 0)) {
rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail;
}
res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_FXVec2f, 0 | 0 );
if (!SWIG_IsOK(res1)) {
SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "FXVec2f *","x", 1, self ));
}
arg1 = reinterpret_cast< FXVec2f * >(argp1);
result = (FXfloat) ((arg1)->x);
vresult = SWIG_From_float(static_cast< float >(result));
return vresult;
fail:
return Qnil;
}
Source
SWIGINTERN VALUE
_wrap_FXVec2f_x_set(int argc, VALUE *argv, VALUE self) {
FXVec2f *arg1 = (FXVec2f *) 0 ;
FXfloat arg2 ;
void *argp1 = 0 ;
int res1 = 0 ;
float val2 ;
int ecode2 = 0 ;
if ((argc < 1) || (argc > 1)) {
rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail;
}
res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_FXVec2f, 0 | 0 );
if (!SWIG_IsOK(res1)) {
SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "FXVec2f *","x", 1, self ));
}
arg1 = reinterpret_cast< FXVec2f * >(argp1);
ecode2 = SWIG_AsVal_float(argv[0], &val2);
if (!SWIG_IsOK(ecode2)) {
SWIG_exception_fail(SWIG_ArgError(ecode2), Ruby_Format_TypeError( "", "FXfloat","x", 2, argv[0] ));
}
arg2 = static_cast< FXfloat >(val2);
if (arg1) (arg1)->x = arg2;
return Qnil;
fail:
return Qnil;
}
Source
SWIGINTERN VALUE
_wrap_FXVec2f_y_get(int argc, VALUE *argv, VALUE self) {
FXVec2f *arg1 = (FXVec2f *) 0 ;
void *argp1 = 0 ;
int res1 = 0 ;
FXfloat result;
VALUE vresult = Qnil;
if ((argc < 0) || (argc > 0)) {
rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail;
}
res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_FXVec2f, 0 | 0 );
if (!SWIG_IsOK(res1)) {
SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "FXVec2f *","y", 1, self ));
}
arg1 = reinterpret_cast< FXVec2f * >(argp1);
result = (FXfloat) ((arg1)->y);
vresult = SWIG_From_float(static_cast< float >(result));
return vresult;
fail:
return Qnil;
}
Source
SWIGINTERN VALUE
_wrap_FXVec2f_y_set(int argc, VALUE *argv, VALUE self) {
FXVec2f *arg1 = (FXVec2f *) 0 ;
FXfloat arg2 ;
void *argp1 = 0 ;
int res1 = 0 ;
float val2 ;
int ecode2 = 0 ;
if ((argc < 1) || (argc > 1)) {
rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail;
}
res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_FXVec2f, 0 | 0 );
if (!SWIG_IsOK(res1)) {
SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "FXVec2f *","y", 1, self ));
}
arg1 = reinterpret_cast< FXVec2f * >(argp1);
ecode2 = SWIG_AsVal_float(argv[0], &val2);
if (!SWIG_IsOK(ecode2)) {
SWIG_exception_fail(SWIG_ArgError(ecode2), Ruby_Format_TypeError( "", "FXfloat","y", 2, argv[0] ));
}
arg2 = static_cast< FXfloat >(val2);
if (arg1) (arg1)->y = arg2;
return Qnil;
fail:
return Qnil;
}