Changeset e752e4e for libcfa/src/vec


Ignore:
Timestamp:
Dec 12, 2019, 11:09:31 AM (5 years ago)
Author:
Dmitry Kobets <dkobets@…>
Branches:
ADT, arm-eh, ast-experimental, enum, forall-pointer-decay, jacob/cs343-translation, master, new-ast-unique-expr, pthread-emulation, qualifiedEnum
Children:
99905f4
Parents:
2fa5bd2
Message:

Fix vec2_float tests

File:
1 edited

Legend:

Unmodified
Added
Removed
  • libcfa/src/vec/vec2.hfa

    r2fa5bd2 re752e4e  
    11#pragma once
    22
     3#include <iostream.hfa>
    34#include "vec.hfa"
    45
     
    5455
    5556    forall(| negate(T)) {
    56     vec2(T) -?(vec2(T)& v) with (v) {
     57    vec2(T) -?(vec2(T) v) with (v) {
    5758        return [-x, -y];
    5859    }
     
    113114    } // static inline
    114115}
     116
     117forall(dtype ostype, otype T | writeable(T, ostype)) {
     118    ostype & ?|?(ostype & os, vec2(T) v) with (v) {
     119        return os | '<' | x | ',' | y | '>';
     120    }
     121    void ?|?(ostype & os, vec2(T) v ) with (v) {
     122        (ostype &)(os | v); ends(os);
     123    }
     124}
     125
Note: See TracChangeset for help on using the changeset viewer.