Fix name determiner util to exclude "u"

This commit is contained in:
Vortrex
2021-01-13 11:04:12 -06:00
parent 052e330642
commit 904f5dc9fe

View File

@@ -1922,11 +1922,16 @@ function doesWordStartWithVowel(word) {
// ------------------------------------------------------------------------- // -------------------------------------------------------------------------
function getProperDeterminerForName(word) { function getProperDeterminerForName(word) {
if(doesWordStartWithVowel(word)) { switch(word.substr(0,1).toLowerCase()) {
return "an"; case "a":
} case "e":
case "i":
case "o":
return "an";
return "a"; default:
return "a";
}
} }
// ------------------------------------------------------------------------- // -------------------------------------------------------------------------
@@ -1936,4 +1941,3 @@ function applyOffsetToVector3(position, position2) {
} }
// ------------------------------------------------------------------------- // -------------------------------------------------------------------------