You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
12 lines
419 B
12 lines
419 B
ClLinearExpression opBinary(string op) (double constant)
|
|
{
|
|
static if (op == "+")
|
|
return new ClLinearExpression(this, 1, constant);
|
|
else static if (op == "-")
|
|
return new ClLinearExpression(this, 1, -constant);
|
|
else static if (op == "*")
|
|
return new ClLinearExpression(this, constant, 0);
|
|
else static if (op == "/")
|
|
return new ClLinearExpression(this, 1.0 / constant, 0);
|
|
}
|