Sync
This commit is contained in:
parent
6f050a029e
commit
776bba907c
3887 changed files with 59894 additions and 7280 deletions
|
|
@ -8,9 +8,7 @@ const struct Imprecise {
|
|||
this.delta = abs(d);
|
||||
}
|
||||
|
||||
template IsImprecise(T) {
|
||||
enum IsImprecise = is(Unqual!T == Unqual!(typeof(this)));
|
||||
}
|
||||
enum IsImprecise(T) = is(Unqual!T == Unqual!(typeof(this)));
|
||||
|
||||
I reciprocal() const pure nothrow {
|
||||
return I(1.0 / value, delta / (value ^^ 2));
|
||||
|
|
@ -83,7 +81,7 @@ const struct Imprecise {
|
|||
}
|
||||
}
|
||||
|
||||
alias Imprecise I;
|
||||
alias I = Imprecise;
|
||||
|
||||
auto distance(T1, T2)(in T1 p1, in T2 p2) pure nothrow {
|
||||
return ((p1[0] - p2[0]) ^^ 2 + (p1[1] - p2[1]) ^^ 2) ^^ 0.5;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue