Ignore:
Timestamp:
May 12, 2012, 1:51:43 PM (8 years ago)
Author:
sam
Message:

math: replace len(vec) with length(vec) to match the GLSL naming.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/monsterz/piece.cpp

    r1310 r1369  
    201201    case PieceData::MOVE:
    202202        /* Only allow swaps when piece is close enough to its target cell. */
    203         if (sqlen(GetShift()) > sqlen(data->size) / 8)
     203        if (sqlength(GetShift()) > sqlength(data->size) / 8)
    204204            return 0;
    205205        /* Fall through */
     
    277277
    278278        ivec2 trip = data->pos_dst - data->pos_src;
    279         float pos_time = len(trip) / data->speed;
     279        float pos_time = length(trip) / data->speed;
    280280        float t = pos_time ? data->timer / pos_time : 1.0f;
    281281        if (t >= 1.0f)
     
    283283        data->pos = vec2(data->pos_src) + t * vec2(trip) + vec2(0.5f);
    284284
    285         float off_time = len(data->off_src) / data->speed;
     285        float off_time = length(data->off_src) / data->speed;
    286286        t = off_time ? data->timer / off_time : 1.0f;
    287287        if (t >= 1.0f)
     
    354354        break;
    355355    case PieceData::UNGRAB:
    356         if (sqlen(data->cell * data->size - data->pos_src)
    357               > sqlen(data->size) / 8)
     356        if (sqlength(data->cell * data->size - data->pos_src)
     357              > sqlength(data->size) / 8)
    358358            off = 7;
    359359        z = 8;
Note: See TracChangeset for help on using the changeset viewer.