16
0
mirror of https://github.com/MaSzyna-EU07/maszyna.git synced 2026-07-21 14:49:19 +02:00

Merge branch 'tmj-dev' into milek-dev

This commit is contained in:
milek7
2018-07-22 12:21:44 +02:00
10 changed files with 145 additions and 96 deletions

View File

@@ -255,14 +255,14 @@ template <typename Type_>
Type_
interpolate( Type_ const &First, Type_ const &Second, float const Factor ) {
return ( First * ( 1.0f - Factor ) ) + ( Second * Factor );
return static_cast<Type_>( ( First * ( 1.0f - Factor ) ) + ( Second * Factor ) );
}
template <typename Type_>
Type_
interpolate( Type_ const &First, Type_ const &Second, double const Factor ) {
return ( First * ( 1.0 - Factor ) ) + ( Second * Factor );
return static_cast<Type_>( ( First * ( 1.0 - Factor ) ) + ( Second * Factor ) );
}
// tests whether provided points form a degenerate triangle