| 191 | } |
| 192 | |
| 193 | OvMaths::FVector3 OvMaths::FVector3::Normalize(const FVector3 & p_target) |
| 194 | { |
| 195 | float length = Length(p_target); |
| 196 | |
| 197 | if (length > 0.0f) |
| 198 | { |
| 199 | float targetLength = 1.0f / length; |
| 200 | |
| 201 | return FVector3 |
| 202 | ( |
| 203 | p_target.x * targetLength, |
| 204 | p_target.y * targetLength, |
| 205 | p_target.z * targetLength |
| 206 | ); |
| 207 | } |
| 208 | else |
| 209 | { |
| 210 | return FVector3::Zero; |
| 211 | } |
| 212 | } |
| 213 | |
| 214 | OvMaths::FVector3 OvMaths::FVector3::Lerp(const FVector3& p_start, const FVector3& p_end, float p_alpha) |
| 215 | { |
no test coverage detected