Esempio n. 1
0
 public T cross(Point <T> other)
 {
     return(GenericArithmetic <T> .substract(
                GenericArithmetic <T> .multiply(x, other.y),
                GenericArithmetic <T> .multiply(y, other.x)
                ));
 }
Esempio n. 2
0
 public static Point <T> operator *(Point <T> a, T s)
 {
     return(new Point <T>(
                GenericArithmetic <T> .multiply(a.x, s),
                GenericArithmetic <T> .multiply(a.y, s)
                ));
 }
Esempio n. 3
0
 public T dot(Point <T> other)
 {
     return(GenericArithmetic <T> .add(
                GenericArithmetic <T> .multiply(x, other.x),
                GenericArithmetic <T> .multiply(y, other.y)
                ));
 }