Changeset 394

Show
Ignore:
Timestamp:
05/20/07 01:05:39 (1 year ago)
Author:
krobillard
Message:

Thune - Added 'set-stride.

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • branches/thune/thread_safe/math.c

    r387 r394  
    966966    { uc_dot,          "dot" }, 
    967967    { uc_cross,        "cross" }, 
    968     { uc_normalize,    "normalize" } 
     968    { uc_normalize,    "normalize" }, 
     969    { uc_set_stride,   "set-stride" } 
    969970#endif 
    970971}; 
  • branches/thune/thread_safe/math3d.c

    r242 r394  
    415415 
    416416 
     417// (vector n -- vector) 
     418UR_CALL( uc_set_stride ) 
     419{ 
     420    UCell* prev = ur_s_prev(tos); 
     421    UR_CALL_UNUSED_TH 
     422    if( ur_is(tos, UT_INT) && ur_is(prev, UT_VECTOR) ) 
     423    { 
     424        ur_vectorStride(prev) = ur_int(tos); 
     425        UR_S_DROP; 
     426        return; 
     427    } 
     428    ur_throwErr( UR_ERR_DATATYPE, "set-stride expected vector! int!" ); 
     429} 
     430 
     431 
    417432/* EOF */ 
  • trunk/thune/math.c

    r377 r394  
    966966    { uc_dot,          "dot" }, 
    967967    { uc_cross,        "cross" }, 
    968     { uc_normalize,    "normalize" } 
     968    { uc_normalize,    "normalize" }, 
     969    { uc_set_stride,   "set-stride" } 
    969970#endif 
    970971}; 
  • trunk/thune/math3d.c

    r242 r394  
    415415 
    416416 
     417// (vector n -- vector) 
     418UR_CALL( uc_set_stride ) 
     419{ 
     420    UCell* prev = ur_s_prev(tos); 
     421    UR_CALL_UNUSED_TH 
     422    if( ur_is(tos, UT_INT) && ur_is(prev, UT_VECTOR) ) 
     423    { 
     424        ur_vectorStride(prev) = ur_int(tos); 
     425        UR_S_DROP; 
     426        return; 
     427    } 
     428    ur_throwErr( UR_ERR_DATATYPE, "set-stride expected vector! int!" ); 
     429} 
     430 
     431 
    417432/* EOF */