MCPcopy Create free account
hub / github.com/Overload-Technologies/Overload / Normalize

Method Normalize

Sources/OvMaths/src/OvMaths/FVector3.cpp:193–212  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

191}
192
193OvMaths::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
214OvMaths::FVector3 OvMaths::FVector3::Lerp(const FVector3& p_start, const FVector3& p_end, float p_alpha)
215{

Callers 15

GetCameraMatrixMethod · 0.45
normalizeVectorArrayMethod · 0.45
aiVector2NormalizeFunction · 0.45
aiVector3NormalizeFunction · 0.45
aiQuaternionNormalizeFunction · 0.45
SpatialSortMethod · 0.45
SGSpatialSortMethod · 0.45
SubdivideFunction · 0.45
CreateGeometryMethod · 0.45
WriteCameraMethod · 0.45
ApplyTransformMethod · 0.45
TriangulateMeshMethod · 0.45

Calls 1

FVector3Class · 0.85

Tested by

no test coverage detected